-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5fd20c7
commit 7edbaf6
Showing
3 changed files
with
75 additions
and
30 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
integration-tests/ci-visibility/vitest-tests/test-visibility-failed-hooks.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { describe, test, expect, beforeEach, afterEach } from 'vitest' | ||
import { sum } from './sum' | ||
|
||
describe('context', () => { | ||
beforeEach(() => { | ||
throw new Error('failed before each') | ||
}) | ||
test('can report failed test', () => { | ||
expect(sum(1, 2)).to.equal(4) | ||
}) | ||
test('can report more', () => { | ||
expect(sum(1, 2)).to.equal(3) | ||
}) | ||
}) | ||
|
||
describe('other context', () => { | ||
afterEach(() => { | ||
throw new Error('failed after each') | ||
}) | ||
test('can report passed test', () => { | ||
expect(sum(1, 2)).to.equal(3) | ||
}) | ||
test('can report more', () => { | ||
expect(sum(1, 2)).to.equal(3) | ||
}) | ||
}) |
15 changes: 12 additions & 3 deletions
15
integration-tests/ci-visibility/vitest-tests/test-visibility-failed-suite.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters