Skip to content

Commit a8fd260

Browse files
committed
feat: added in jest-extended
1 parent 9ef5243 commit a8fd260

File tree

4 files changed

+175
-1
lines changed

4 files changed

+175
-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: 167 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
@@ -49,6 +49,7 @@
4949
"eslint-plugin-import": "^2.26.0",
5050
"eslint-plugin-prettier": "^4.0.0",
5151
"jest": "^28.1.1",
52+
"jest-extended": "^3.0.1",
5253
"jest-junit": "^14.0.0",
5354
"jest-mock-process": "^2.0.0",
5455
"node-gyp-build": "^4.4.0",

tests/global.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
/* eslint-disable no-var */
2+
3+
/// <reference types="jest-extended" />
4+
25
/**
36
* Follows the globals in jest.config.ts
47
* @module

0 commit comments

Comments
 (0)