-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add `only` modifier to `describe`, `it` and `test` methods * ci: add tests * ci: add tests * chore: improve tests * chore: improve overloads * chore: improve errors * chore: add `--describeOnly`, `--itOnly` and `--testOnly` flags * chore: add `--ensure` flags * docs: add docs
- Loading branch information
1 parent
402af07
commit 7658609
Showing
17 changed files
with
598 additions
and
33 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ export const results = { | |
}; | ||
|
||
export const VERSION = ''; | ||
|
||
export const deepOptions: string[] = []; |
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
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
29 changes: 29 additions & 0 deletions
29
test/__fixtures__/e2e/only/--describe-only/basic-logs.test.ts
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,29 @@ | ||
import { assert } from '../../../../../src/modules/essentials/assert.js'; | ||
import { describe } from '../../../../../src/modules/helpers/describe.js'; | ||
import { it } from '../../../../../src/modules/helpers/it/core.js'; | ||
|
||
let counter = 0; | ||
|
||
it('Should skip', () => { | ||
counter++; | ||
}); | ||
|
||
describe.only('Should run', () => { | ||
it('Should run', () => { | ||
counter++; | ||
}); | ||
}); | ||
|
||
describe('Should skip', () => { | ||
counter++; | ||
|
||
it('Should never be called', () => { | ||
counter++; | ||
}); | ||
|
||
it.only('Should never be called', () => { | ||
counter++; | ||
}); | ||
}); | ||
|
||
assert.strictEqual(counter, 2); |
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,41 @@ | ||
import { assert } from '../../../../../src/modules/essentials/assert.js'; | ||
import { describe } from '../../../../../src/modules/helpers/describe.js'; | ||
import { it } from '../../../../../src/modules/helpers/it/core.js'; | ||
|
||
let counter = 0; | ||
|
||
it('Should skip', () => { | ||
counter++; | ||
}); | ||
|
||
it.only('Should run', () => { | ||
counter++; | ||
}); | ||
|
||
describe('Should skip', () => { | ||
it('Should skip', () => { | ||
counter++; | ||
}); | ||
|
||
it.only('Should run', () => { | ||
counter++; | ||
}); | ||
}); | ||
|
||
describe('Should run', () => { | ||
it('Should skip', () => { | ||
counter++; | ||
}); | ||
|
||
it.only('Should run', () => { | ||
counter++; | ||
}); | ||
}); | ||
|
||
describe('Should run', () => { | ||
it.only('Should run', () => { | ||
counter++; | ||
}); | ||
}); | ||
|
||
assert.strictEqual(counter, 4); |
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,45 @@ | ||
import { assert } from '../../../../../src/modules/essentials/assert.js'; | ||
import { describe } from '../../../../../src/modules/helpers/describe.js'; | ||
import { it } from '../../../../../src/modules/helpers/it/core.js'; | ||
|
||
let counter = 0; | ||
|
||
it('Should skip', () => { | ||
counter++; | ||
}); | ||
|
||
it.only('Should run', () => { | ||
counter++; | ||
}); | ||
|
||
it('Should skip', () => { | ||
counter++; | ||
}); | ||
|
||
describe('Should skip', () => { | ||
it('Should never be called', () => { | ||
counter++; | ||
}); | ||
|
||
it.only('Should never be called', () => { | ||
counter++; | ||
}); | ||
}); | ||
|
||
describe.only('Should run', () => { | ||
it('Should skip', () => { | ||
counter++; | ||
}); | ||
|
||
it.only('Should run', () => { | ||
counter++; | ||
}); | ||
}); | ||
|
||
describe.only('Should run', () => { | ||
it.only('Should run', () => { | ||
counter++; | ||
}); | ||
}); | ||
|
||
assert.strictEqual(counter, 3); |
Oops, something went wrong.