-
Notifications
You must be signed in to change notification settings - Fork 1.8k
chore: migrate test runner from mocha to jest #2567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 36 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
54ee96f
chore: update nyc coverage threshold
maverick1872 a960599
chore: install latest jest
maverick1872 3d7d2ec
chore: create initial jest configuration
maverick1872 9319fa7
chore: add jest globals to eslint config
maverick1872 d7d8c0d
chore: convert mocha syntax to jest syntax
maverick1872 257929e
chore: skip test due to jest detecting open handles from it
maverick1872 a3a5cc1
fix: convert test accordingly for jest runtime
maverick1872 ed15ed4
fix: replace incomplete test with todo for issue 2103
maverick1872 18b62ed
fix: make legacy logger tests jest compatible
maverick1872 008fb4a
fix: correct unknown log level test for jest runtime
maverick1872 39d6498
fix: refactor file-archive.test and make significantly more clear
maverick1872 3c10734
fix: consolidate file archive tests
maverick1872 0ff03c2
chore: remove unused dependencies
maverick1872 82d2c82
fix: correct referenced npm command in ci workflow
maverick1872 f219e10
chore: revert to previous assertion style
maverick1872 4de6df5
chore: consolidate file transport tests
maverick1872 4cbecb6
chore: re-enable test
maverick1872 f208bed
chore: drop jest to v29.x to maintain node 16 support
maverick1872 3949a81
chore: add tests for log level instance methods
maverick1872 067e73d
chore: temp disable coverage thresholds
maverick1872 4cb6b66
chore: reenable coverage to figured out why it behaves differently
maverick1872 a408e4c
fix: update exception handler tests to pass with jest
maverick1872 c684258
chore: cleanup tests
maverick1872 b29547b
chore: cleanup jest configs
maverick1872 f8d23af
chore: cleanup
maverick1872 1ed361b
chore: format printed line
maverick1872 b5b237f
chore: cleanup and leverage await rather than timeouts
maverick1872 f2f5c4c
fix: update node types to resolve failing typescript changes caused b…
maverick1872 46d8c00
chore: make ci not fail fast to help identify if issue is specific to…
maverick1872 741d0f8
chore: update jest coverage threshold
maverick1872 58f2aa3
chore: address missing coverage and cleanup helpers
maverick1872 926ec37
chore: cleanup mocha and nyc configs
maverick1872 cbc160e
fix: cleanup exception stream tests that were missed
maverick1872 34924e4
chore: address readme copilot feedback
maverick1872 922c9f8
chore: add contributor
maverick1872 80f551e
chore: resolve merge conflicts
maverick1872 2b89a20
fix: remove duplicate dependency reference
maverick1872 815b2d1
chore: address copilot feedback round 2
maverick1872 7cfdaa1
chore: address final copilot comment
maverick1872 29ae48b
chore: fix package-lock
maverick1872 d67ca99
fix: add argument to the correct asstion this time round and make exp…
maverick1872 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 @@ | ||
| /** | ||
| * @type {import('@jest/types').Config.InitialOptions} | ||
| */ | ||
| module.exports = { | ||
| collectCoverage: false, | ||
| collectCoverageFrom: [ | ||
| '<rootDir>/lib/**/*.js' | ||
| ], | ||
| coverageDirectory: 'coverage', | ||
| testEnvironment: 'node', | ||
| testMatch: [ | ||
| '<rootDir>/test/**/*.test.js' | ||
| ], | ||
| globalSetup: '<rootDir>/test/globalSetup.js', | ||
| silent: true, | ||
| verbose: true, | ||
| coverageThreshold: { | ||
| global: { | ||
| functions: 74.54, | ||
| lines: 72.48, | ||
| statements: 72.25, | ||
| branches: 64.04 | ||
| } | ||
| } | ||
| }; | ||
|
|
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -48,6 +48,6 @@ class Profiler { | |
|
|
||
| return this.logger.write(info); | ||
| } | ||
| }; | ||
| } | ||
|
|
||
| module.exports = Profiler; | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.