Skip to content

Commit

Permalink
test: integrated jest-extended to gain access to expect.toSatisfy
Browse files Browse the repository at this point in the history
  • Loading branch information
CMCDragonkai committed Jul 28, 2022
1 parent 07a3c5a commit 200c0f1
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ module.exports = {
// Setup files after env are executed before each test file
// after the jest test environment is installed
// Can access globals
setupFilesAfterEnv: ['<rootDir>/tests/setupAfterEnv.ts'],
setupFilesAfterEnv: [
'jest-extended/all',
'<rootDir>/tests/setupAfterEnv.ts'
],
moduleNameMapper: moduleNameMapper,
};
27 changes: 27 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^28.1.1",
"jest-extended": "^3.0.1",
"jest-junit": "^14.0.0",
"prettier": "^2.6.2",
"rimraf": "^3.0.2",
Expand Down
1 change: 1 addition & 0 deletions tests/setup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import path from 'path';
import 'jest-extended'; // Import jest-extended types

declare global {
namespace NodeJS {
Expand Down

1 comment on commit 200c0f1

@CMCDragonkai
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was superseded by 6e54747

Please sign in to comment.