-
-
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 stable
only
modifier to describe
, it
and test
metho…
…ds (#901) * feat: add `only` modifier to `describe`, `it` and `test` methods * chore: fix lint * ci: add tests * ci: add tests * ci: add tests * ci: remove old tests * ci: add ordered tests * docs: add `only` modifier to `describe`, `it` and `test` methods * docs: improve only documentation
- Loading branch information
1 parent
720616b
commit d6b6241
Showing
24 changed files
with
760 additions
and
563 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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
export const checkOnly = (cb: unknown): boolean => { | ||
if (typeof cb !== 'function') return false; | ||
|
||
const body = cb.toString(); | ||
|
||
return ( | ||
body.includes('it.only') || | ||
body.includes('test.only') || | ||
body.includes('describe.only') | ||
); | ||
}; | ||
|
||
export const CheckNoOnly = (cb: unknown): boolean => { | ||
if (typeof cb !== 'function') return false; | ||
|
||
const body = cb.toString(); | ||
|
||
return !( | ||
body.includes('it.only') || | ||
body.includes('test.only') || | ||
body.includes('describe.only') | ||
); | ||
}; |
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: 0 additions & 29 deletions
29
test/__fixtures__/e2e/only/--describe-only/basic-logs.test.ts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.