This repository has been archived by the owner on Oct 6, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Showing
24 changed files
with
773 additions
and
421 deletions.
There are no files selected for viewing
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,14 @@ | ||
import { setupConfigLoader, toProgramConfig, runAllTests } from '@peeky/test' | ||
|
||
const configLoader = await setupConfigLoader() | ||
const config = await configLoader.loadConfig() | ||
await configLoader.destroy() | ||
|
||
const { stats: { errorSuiteCount } } = await runAllTests(toProgramConfig(config), { | ||
/* options here */ | ||
quickTestFilter: 'nested', | ||
}) | ||
|
||
if (errorSuiteCount) { | ||
process.exit(1) | ||
} |
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,49 @@ | ||
let count = 0 | ||
|
||
beforeEach(() => { | ||
count++ | ||
}) | ||
|
||
describe.skip('skipped suite', () => { | ||
it('skipped test', () => { | ||
// Skipped | ||
}) | ||
}) | ||
|
||
describe.todo('todo suite') | ||
|
||
describe('nested suite', () => { | ||
it('skipped test', () => { | ||
// Skipped | ||
}) | ||
|
||
describe.only('only suite', () => { | ||
it('test 1', () => { | ||
expect(count).toBe(1) | ||
}) | ||
|
||
describe('even more nesting', () => { | ||
beforeEach(() => { | ||
count++ | ||
}) | ||
|
||
it.only('test 2', () => { | ||
expect(count).toBe(3) | ||
}) | ||
|
||
describe('skipped suite', () => { | ||
it('skipped test', () => { | ||
// Skipped | ||
}) | ||
}) | ||
}) | ||
|
||
it('test 3', () => { | ||
expect(count).toBe(4) | ||
}) | ||
}) | ||
}) | ||
|
||
it('should count correctly', () => { | ||
expect(count).toBe(5) | ||
}) |
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
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
Oops, something went wrong.