chore: bump jest to 27.0.6 (#828)
- @types/jest was bumped to 26 because 27 doesn't exist - jest-diff had to be explicitly added so that Yarn would hoist it. Tests would crash otherwise. - Removed unused babel-plugin-module-resolver - Removed unused jest-enzyme (which pulled in Jest 24) - Removed option `haste.providesModuleNodeModules` as it is no longer valid
This commit is contained in:
Родитель
f8b734e571
Коммит
925cf4eb5f
|
@ -36,8 +36,6 @@
|
|||
"@rnx-kit/metro-config": "^1.2.3",
|
||||
"@uifabricshared/build-native": "^0.1.1",
|
||||
"@uifabricshared/eslint-config-rules": "^0.1.1",
|
||||
"babel-jest": "^24.9.0",
|
||||
"jest": "^24.9.0",
|
||||
"metro-react-native-babel-preset": "^0.59.0",
|
||||
"react-native-svg-transformer": "^0.14.3",
|
||||
"react-native-test-app": "^0.7.0",
|
||||
|
|
|
@ -34,8 +34,6 @@
|
|||
"@rnx-kit/metro-config": "^1.2.3",
|
||||
"@uifabricshared/build-native": "^0.1.1",
|
||||
"@uifabricshared/eslint-config-rules": "^0.1.1",
|
||||
"babel-jest": "^24.9.0",
|
||||
"jest": "^24.9.0",
|
||||
"metro-config": "^0.59.0",
|
||||
"metro-react-native-babel-preset": "^0.59.0",
|
||||
"react-native-svg-transformer": "^0.14.3",
|
||||
|
|
|
@ -33,8 +33,6 @@
|
|||
"@rnx-kit/metro-config": "^1.2.3",
|
||||
"@uifabricshared/build-native": "^0.1.1",
|
||||
"@uifabricshared/eslint-config-rules": "^0.1.1",
|
||||
"babel-jest": "^24.9.0",
|
||||
"jest": "^24.9.0",
|
||||
"metro-config": "^0.59.0",
|
||||
"metro-react-native-babel-preset": "^0.59.0",
|
||||
"react-native-svg-transformer": "^0.14.3",
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
"react-native-web": "^0.12.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^25.1.4",
|
||||
"@types/jest": "^26.0.0",
|
||||
"@types/node": "^12.0.0",
|
||||
"@types/react": ">=16.9.34 < 16.14.0",
|
||||
"@types/react-dom": "^16.9.0",
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"lint": "fluentui-scripts lint",
|
||||
"report": "allure generate allure-results --clean",
|
||||
"start": "react-native start",
|
||||
"test": "jest",
|
||||
"test": "fluentui-scripts jest",
|
||||
"prewindows": "install-windows-test-app --use-nuget",
|
||||
"windows": "react-native run-windows --sln windows/FluentTester.sln"
|
||||
},
|
||||
|
@ -41,8 +41,6 @@
|
|||
"@wdio/sync": "5.20.1",
|
||||
"allure-commandline": "2.13.0",
|
||||
"appium": "1.17.1",
|
||||
"babel-jest": "^24.9.0",
|
||||
"jest": "^24.9.0",
|
||||
"metro-config": "^0.59.0",
|
||||
"metro-react-native-babel-preset": "^0.59.0",
|
||||
"react-native-test-app": "^0.7.0",
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "none",
|
||||
"comment": "Bumped Jest to 27.0.6",
|
||||
"packageName": "@fluentui-react-native/adapters",
|
||||
"email": "4123478+tido64@users.noreply.github.com",
|
||||
"dependentChangeType": "none"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "none",
|
||||
"comment": "Bumped Jest to 27.0.6",
|
||||
"packageName": "@fluentui-react-native/component-cache",
|
||||
"email": "4123478+tido64@users.noreply.github.com",
|
||||
"dependentChangeType": "none"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "none",
|
||||
"comment": "Bumped Jest to 27.0.6",
|
||||
"packageName": "@fluentui-react-native/immutable-merge",
|
||||
"email": "4123478+tido64@users.noreply.github.com",
|
||||
"dependentChangeType": "none"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "none",
|
||||
"comment": "Bumped Jest to 27.0.6",
|
||||
"packageName": "@fluentui-react-native/memo-cache",
|
||||
"email": "4123478+tido64@users.noreply.github.com",
|
||||
"dependentChangeType": "none"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "none",
|
||||
"comment": "Bumped Jest to 27.0.6",
|
||||
"packageName": "@fluentui-react-native/merge-props",
|
||||
"email": "4123478+tido64@users.noreply.github.com",
|
||||
"dependentChangeType": "none"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "none",
|
||||
"comment": "Bumped Jest to 27.0.6",
|
||||
"packageName": "@fluentui-react-native/use-styling",
|
||||
"email": "4123478+tido64@users.noreply.github.com",
|
||||
"dependentChangeType": "none"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "none",
|
||||
"comment": "Bumped Jest to 27.0.6",
|
||||
"packageName": "@fluentui-react-native/use-tokens",
|
||||
"email": "4123478+tido64@users.noreply.github.com",
|
||||
"dependentChangeType": "none"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "none",
|
||||
"comment": "Bumped Jest to 27.0.6",
|
||||
"packageName": "@uifabricshared/foundation-composable",
|
||||
"email": "4123478+tido64@users.noreply.github.com",
|
||||
"dependentChangeType": "none"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "none",
|
||||
"comment": "Bumped Jest to 27.0.6",
|
||||
"packageName": "@uifabricshared/foundation-settings",
|
||||
"email": "4123478+tido64@users.noreply.github.com",
|
||||
"dependentChangeType": "none"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "none",
|
||||
"comment": "Bumped Jest to 27.0.6",
|
||||
"packageName": "@uifabricshared/foundation-tokens",
|
||||
"email": "4123478+tido64@users.noreply.github.com",
|
||||
"dependentChangeType": "none"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "none",
|
||||
"comment": "Bumped Jest to 27.0.6",
|
||||
"packageName": "@uifabricshared/theme-registry",
|
||||
"email": "4123478+tido64@users.noreply.github.com",
|
||||
"dependentChangeType": "none"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "none",
|
||||
"comment": "Bumped Jest to 27.0.6",
|
||||
"packageName": "@uifabricshared/themed-settings",
|
||||
"email": "4123478+tido64@users.noreply.github.com",
|
||||
"dependentChangeType": "none"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "none",
|
||||
"comment": "Bumped Jest to 27.0.6",
|
||||
"packageName": "@uifabricshared/theming-ramp",
|
||||
"email": "4123478+tido64@users.noreply.github.com",
|
||||
"dependentChangeType": "none"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "none",
|
||||
"comment": "Bumped Jest to 27.0.6",
|
||||
"packageName": "@uifabricshared/theming-react-native",
|
||||
"email": "4123478+tido64@users.noreply.github.com",
|
||||
"dependentChangeType": "none"
|
||||
}
|
|
@ -38,7 +38,7 @@
|
|||
"@uifabricshared/foundation-settings": ">=0.9.2 <1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^25.1.4",
|
||||
"@types/jest": "^26.0.0",
|
||||
"@types/react": ">=16.9.34 < 16.14.0",
|
||||
"react": "16.13.1",
|
||||
"@uifabricshared/build-native": "^0.1.1",
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
"@fluentui-react-native/merge-props": ">=0.3.2 <1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^25.1.4",
|
||||
"@types/jest": "^26.0.0",
|
||||
"@types/react-native": "^0.63.0",
|
||||
"@uifabricshared/build-native": "^0.1.1",
|
||||
"@uifabricshared/eslint-config-rules": "^0.1.1",
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
"@uifabricshared/foundation-settings": ">=0.9.2 <1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^25.1.4",
|
||||
"@types/jest": "^26.0.0",
|
||||
"@types/react-native": "^0.63.0",
|
||||
"@uifabricshared/build-native": "^0.1.1",
|
||||
"@fluentui-react-native/memo-cache": "^1.1.2",
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@fluentui-react-native/immutable-merge": "^1.1.2",
|
||||
"@types/jest": "^25.1.4",
|
||||
"@types/jest": "^26.0.0",
|
||||
"@types/react-native": "^0.63.0",
|
||||
"@uifabricshared/build-native": "^0.1.1",
|
||||
"@uifabricshared/eslint-config-rules": "^0.1.1",
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
"@uifabricshared/foundation-settings": ">=0.9.2 <1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^25.1.4",
|
||||
"@types/jest": "^26.0.0",
|
||||
"@types/node": "^10.3.5",
|
||||
"@types/react-native": "^0.63.0",
|
||||
"@uifabricshared/build-native": "^0.1.1",
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@fluentui-react-native/test-tools": ">=0.1.1 <1.0.0",
|
||||
"@types/jest": "^25.1.4",
|
||||
"@types/jest": "^26.0.0",
|
||||
"@types/react": ">=16.9.34 < 16.14.0",
|
||||
"react": "16.13.1",
|
||||
"@uifabricshared/build-native": "^0.1.1",
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
"@uifabricshared/theming-ramp": ">=0.14.9 <1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^25.1.4",
|
||||
"@types/jest": "^26.0.0",
|
||||
"@types/react": ">=16.9.34 < 16.14.0",
|
||||
"react": "16.13.1",
|
||||
"react-native": "^0.63.4",
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
"author": "",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@types/jest": "^25.1.4",
|
||||
"@types/jest": "^26.0.0",
|
||||
"@types/node": "^10.3.5",
|
||||
"@uifabricshared/build-native": "^0.1.1",
|
||||
"@uifabricshared/eslint-config-rules": "^0.1.1",
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
"author": "",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@types/jest": "^25.1.4",
|
||||
"@types/jest": "^26.0.0",
|
||||
"@types/node": "^10.3.5",
|
||||
"@uifabricshared/build-native": "^0.1.1",
|
||||
"@uifabricshared/eslint-config-rules": "^0.1.1"
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
"author": "",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@types/jest": "^25.1.4",
|
||||
"@types/jest": "^26.0.0",
|
||||
"@types/node": "^10.3.5",
|
||||
"@uifabricshared/build-native": "^0.1.1",
|
||||
"@uifabricshared/eslint-config-rules": "^0.1.1"
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
"@fluentui-react-native/memo-cache": "^1.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^25.1.4",
|
||||
"@types/jest": "^26.0.0",
|
||||
"@types/react-native": "^0.63.0",
|
||||
"@uifabricshared/build-native": "^0.1.1",
|
||||
"@uifabricshared/eslint-config-rules": "^0.1.1",
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
"@fluentui-react-native/use-tokens": "^0.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^25.1.4",
|
||||
"@types/jest": "^26.0.0",
|
||||
"@types/react-native": "^0.63.0",
|
||||
"@uifabricshared/build-native": "^0.1.1",
|
||||
"react": "16.13.1",
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@fluentui-react-native/merge-props": "^0.3.2",
|
||||
"@types/jest": "^25.1.4",
|
||||
"@types/jest": "^26.0.0",
|
||||
"@uifabricshared/build-native": "^0.1.1",
|
||||
"react": "16.13.1",
|
||||
"react-native": "^0.63.4"
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^25.1.4",
|
||||
"@types/jest": "^26.0.0",
|
||||
"@types/react-native": "^0.63.0",
|
||||
"@uifabricshared/build-native": "^0.1.1",
|
||||
"@uifabricshared/eslint-config-rules": "^0.1.1"
|
||||
|
|
|
@ -5,39 +5,4 @@ module.exports = {
|
|||
'@babel/preset-typescript',
|
||||
'module:metro-react-native-babel-preset',
|
||||
],
|
||||
plugins: [
|
||||
[
|
||||
'module-resolver',
|
||||
{
|
||||
root: ['./src'],
|
||||
extensions: [
|
||||
'.js',
|
||||
'.ts',
|
||||
'.tsx',
|
||||
'.json',
|
||||
'.android.js',
|
||||
'.android.ts',
|
||||
'.android.tsx',
|
||||
'.ios.js',
|
||||
'.ios.ts',
|
||||
'.ios.tsx',
|
||||
'.macos.js',
|
||||
'.macos.ts',
|
||||
'.macos.tsx',
|
||||
'.native.js',
|
||||
'.native.ts',
|
||||
'.native.tsx',
|
||||
'.web.js',
|
||||
'.web.ts',
|
||||
'.web.tsx',
|
||||
'.win32.js',
|
||||
'.win32.ts',
|
||||
'.win32.tsx',
|
||||
'.windows.js',
|
||||
'.windows.ts',
|
||||
'.windows.tsx',
|
||||
],
|
||||
},
|
||||
],
|
||||
],
|
||||
};
|
||||
|
|
|
@ -30,24 +30,20 @@
|
|||
"@types/enzyme": "^3.10.5",
|
||||
"@types/es6-collections": "^0.5.29",
|
||||
"@types/es6-promise": "0.0.32",
|
||||
"@types/jest": "^25.1.4",
|
||||
"@types/jest": "^26.0.0",
|
||||
"@types/node": "^12.11.2",
|
||||
"@types/react-native": "^0.63.0",
|
||||
"@types/react-test-renderer": "16.9.0",
|
||||
"@types/webpack-env": "1.13.6",
|
||||
"@uifabric/prettier-rules": "^7.0.3",
|
||||
"babel-jest": "^24.9.0",
|
||||
"babel-plugin-module-resolver": "^4.0.0",
|
||||
"depcheck": "^1.0.0",
|
||||
"enzyme": "^3.11.0",
|
||||
"enzyme-adapter-react-16": "^1.15.4",
|
||||
"enzyme-to-json": "^3.5.0",
|
||||
"find-up": "^5.0.0",
|
||||
"fs-extra": "^7.0.1",
|
||||
"jest": "^24.9.0",
|
||||
"jest-cli": "^24.9.0",
|
||||
"jest-environment-jsdom": "^24.9.0",
|
||||
"jest-enzyme": "^7.1.2",
|
||||
"jest": "^27.0.0",
|
||||
"jest-diff": "^27.0.0",
|
||||
"jsdom": "^16.4.0",
|
||||
"just-scripts": "^0.38.0",
|
||||
"just-task": "^0.14.3",
|
||||
|
|
|
@ -66,12 +66,10 @@ export function configureReactNativeJest(platform?: PlatformValue, customConfig?
|
|||
haste: {
|
||||
defaultPlatform: platform,
|
||||
platforms: getAllPlatforms(),
|
||||
// hasteImplModulePath: rnPath + 'jest/hasteImpl.js',
|
||||
providesModuleNodeModules: [rnPackage],
|
||||
},
|
||||
transformIgnorePatterns: ['node_modules/(?!(react-native)/)'],
|
||||
verbose: false,
|
||||
setupFilesAfterEnv: [path.join(__dirname, './jest/setupEnzyme.js')],
|
||||
setupFilesAfterEnv: [path.join(__dirname, 'jest', 'setupEnzyme.js')],
|
||||
},
|
||||
customConfig,
|
||||
);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
// setup-tests.js
|
||||
import 'react-native';
|
||||
import 'jest-enzyme';
|
||||
import Adapter from 'enzyme-adapter-react-16';
|
||||
import Enzyme from 'enzyme';
|
||||
|
||||
|
@ -9,7 +8,11 @@ import Enzyme from 'enzyme';
|
|||
*/
|
||||
const { JSDOM } = require('jsdom');
|
||||
|
||||
const jsdom = new JSDOM('<!doctype html><html><body></body></html>');
|
||||
const jsdom = new JSDOM('<!doctype html><html><body></body></html>', {
|
||||
// Fixes "SecurityError: localStorage is not available for opaque origins".
|
||||
// See https://github.com/jsdom/jsdom/issues/2304#issuecomment-408320484
|
||||
url: 'https://localhost',
|
||||
});
|
||||
const { window } = jsdom;
|
||||
|
||||
function copyProps(src, target) {
|
||||
|
|
1824
yarn.lock
1824
yarn.lock
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче