Skip to content
This repository was archived by the owner on Mar 29, 2025. It is now read-only.

Commit ddd7fa0

Browse files
committed
Configured Serenity/JS reporting services
1 parent 982cf7d commit ddd7fa0

4 files changed

Lines changed: 13 additions & 19 deletions

File tree

.mocharc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
require:
22
- ts-node/register
3+
- spec/config.ts
4+
reporter: '@serenity-js/mocha'
35
spec: 'spec/**/*.spec.ts'
46
timeout: 5000

spec/config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { configure } from '@serenity-js/core';
2+
import { ConsoleReporter } from '@serenity-js/console-reporter';
3+
4+
configure({
5+
crew: [
6+
ConsoleReporter.forDarkTerminals(),
7+
]
8+
})

spec/hello-serenity.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

spec/mocha.spec.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,17 @@ describe('Mocha', () => {
77

88
it('has no body as "pending"')
99

10-
it.skip('is skipped', () => {
11-
12-
})
1310

1411
it('has no errors as "passing"', () => {
1512

1613
})
1714

18-
it('has assertion errors as "failing"', () => {
15+
// remove '.skip' to see how failing tests are reported
16+
it.skip('has assertion errors as "failing"', () => {
1917
strictEqual(false, true, 'example assertion')
2018
})
2119

22-
it('has any other errors as "failing" too', () => {
20+
it.skip('has any other errors as "failing" too', () => {
2321
throw new Error('Something went wrong')
2422
})
2523
})

0 commit comments

Comments
 (0)