mirror of https://github.com/facebook/jest.git
chore: remove unneeded test env from angular example (#12606)
This commit is contained in:
parent
719e8ea240
commit
dff2c759bb
|
@ -1,7 +1,7 @@
|
|||
module.exports = {
|
||||
moduleFileExtensions: ['ts', 'html', 'js', 'json'],
|
||||
setupFilesAfterEnv: ['<rootDir>/setupJest.js'],
|
||||
testEnvironment: '<rootDir>/test-env.js',
|
||||
testEnvironment: 'jsdom',
|
||||
transform: {
|
||||
'\\.[tj]s$': ['babel-jest', {configFile: require.resolve('./.babelrc')}],
|
||||
},
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"@angular/platform-browser": "^12.0.0",
|
||||
"@angular/platform-browser-dynamic": "^12.0.0",
|
||||
"core-js": "^3.2.1",
|
||||
"rxjs": "^7.3.0",
|
||||
"rxjs": "^7.5.5",
|
||||
"tslib": "^2.0.0",
|
||||
"typescript": "*",
|
||||
"zone.js": "~0.11.3"
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const {
|
||||
TestEnvironment: JSDOMTestEnvironment,
|
||||
} = require('jest-environment-jsdom');
|
||||
|
||||
module.exports = class AngularEnv extends JSDOMTestEnvironment {
|
||||
exportConditions() {
|
||||
// we need to include `node` as `rxjs` defines `node`, `es2015`, `default`, not `browser` or `require`
|
||||
// https://github.com/ReactiveX/rxjs/pull/6821
|
||||
return super.exportConditions().concat('node');
|
||||
}
|
||||
};
|
10
yarn.lock
10
yarn.lock
|
@ -6144,7 +6144,7 @@ __metadata:
|
|||
core-js: ^3.2.1
|
||||
jest: "*"
|
||||
jest-zone-patch: "*"
|
||||
rxjs: ^7.3.0
|
||||
rxjs: ^7.5.5
|
||||
tslib: ^2.0.0
|
||||
typescript: "*"
|
||||
zone.js: ~0.11.3
|
||||
|
@ -19661,12 +19661,12 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"rxjs@npm:^7.3.0, rxjs@npm:^7.5.4":
|
||||
version: 7.5.4
|
||||
resolution: "rxjs@npm:7.5.4"
|
||||
"rxjs@npm:^7.5.4, rxjs@npm:^7.5.5":
|
||||
version: 7.5.5
|
||||
resolution: "rxjs@npm:7.5.5"
|
||||
dependencies:
|
||||
tslib: ^2.1.0
|
||||
checksum: 6f55f835f2543bc8214900f9e28b6320e6adc95875011fbca63e80a66eb18c9ff7cfdccb23b2180cbb6412762b98ed158c89fd51cb020799d127c66ea38c3c0e
|
||||
checksum: e034f60805210cce756dd2f49664a8108780b117cf5d0e2281506e9e6387f7b4f1532d974a8c8b09314fa7a16dd2f6cff3462072a5789672b5dcb45c4173f3c6
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
|
Loading…
Reference in New Issue