From 4981600247edf5ff166851b384e7664f9ea50a6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20P=C3=A4rsson?= Date: Wed, 31 Jul 2024 11:48:05 +0200 Subject: [PATCH] Import the `TestCase` type --- spec/e2e.spec.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/spec/e2e.spec.ts b/spec/e2e.spec.ts index bf5e826..4fbf3a4 100644 --- a/spec/e2e.spec.ts +++ b/spec/e2e.spec.ts @@ -1,4 +1,4 @@ -import defaultBuilder, { type Builder, TestSuite } from '../dist'; +import defaultBuilder, { type Builder, TestCase, TestSuite } from '../dist'; //@ts-ignore import rmdir from 'rimraf'; import fs from 'fs'; @@ -22,12 +22,14 @@ describe('JUnit Report builder', () => { builder.testCase().className('root.test.Class1'); const suite1: TestSuite = builder.testSuite().name('first.Suite'); suite1.testCase().name('Second test'); - suite1 - .testCase() + + const case2: TestCase = suite1.testCase(); + case2 .className('suite1.test.Class2') .name('Third test') .file('./path-to/the-test-file.coffee') .property('property name', 'property value'); + const suite2 = builder.testSuite().name('second.Suite'); suite2.testCase().failure('Failure message'); suite2.testCase().stacktrace('Stacktrace');