Skip to content

Commit 200c0f1

Browse files
committed
test: integrated jest-extended to gain access to expect.toSatisfy
1 parent 07a3c5a commit 200c0f1

File tree

4 files changed

+33
-1
lines changed

4 files changed

+33
-1
lines changed

jest.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ module.exports = {
6060
// Setup files after env are executed before each test file
6161
// after the jest test environment is installed
6262
// Can access globals
63-
setupFilesAfterEnv: ['<rootDir>/tests/setupAfterEnv.ts'],
63+
setupFilesAfterEnv: [
64+
'jest-extended/all',
65+
'<rootDir>/tests/setupAfterEnv.ts'
66+
],
6467
moduleNameMapper: moduleNameMapper,
6568
};

package-lock.json

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
"eslint-plugin-import": "^2.26.0",
7575
"eslint-plugin-prettier": "^4.0.0",
7676
"jest": "^28.1.1",
77+
"jest-extended": "^3.0.1",
7778
"jest-junit": "^14.0.0",
7879
"prettier": "^2.6.2",
7980
"rimraf": "^3.0.2",

tests/setup.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import path from 'path';
2+
import 'jest-extended'; // Import jest-extended types
23

34
declare global {
45
namespace NodeJS {

0 commit comments

Comments
 (0)