Skip to content

Commit 932f70b

Browse files
committed
feat: support jasmine
1 parent d3fae95 commit 932f70b

2 files changed

Lines changed: 17 additions & 9 deletions

File tree

src/reporter/utils.ts

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,20 @@ export function mapHooks(hooks: HookStats[]): Hook[] {
1515
}
1616

1717
export function mapTests(tests: TestStats[]): Test[] {
18-
return tests.map((test) => ({
19-
name: test.title,
20-
start: test.start,
21-
end: test.end,
22-
duration: test.duration,
23-
state: test.state,
24-
error: test.error,
25-
}))
18+
const result = []
19+
for (const test of tests) {
20+
if (typeof test.pendingReason !== 'undefined' && test.pendingReason === 'grep') {
21+
continue
22+
}
23+
24+
result.push({
25+
name: test.title,
26+
start: test.start,
27+
end: test.end,
28+
duration: test.duration,
29+
state: test.state,
30+
error: test.error,
31+
})
32+
}
33+
return result
2634
}

src/worker/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ export async function runTest(this: WorkerMetaContext, options: RunTestOptions):
2222
wdioArgs.spec = options.specs
2323
}
2424

25-
// TODO: support the Jasmine, and Cucumber.js
2625
// Add grep pattern if provided
2726
if (options.grep) {
2827
wdioArgs.mochaOpts = { grep: options.grep }
28+
wdioArgs.jasmineOpts = { grep: options.grep }
2929
}
3030

3131
wdioArgs.reporters = [[VSCODE_REPORTER_PATH, { stdout: true, outputDir: options.outputDir }]]

0 commit comments

Comments
 (0)