@toptal/davinci-qa 5.7.1-alpha-fx-change-https-port.3 → 5.7.1-alpha-chore-upgrade-jest-27-v.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/davinci-qa",
3
- "version": "5.7.1-alpha-fx-change-https-port.3+aec34d7c",
3
+ "version": "5.7.1-alpha-chore-upgrade-jest-27-v.7+ddc420b7",
4
4
  "description": "QA package to test your application",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -37,20 +37,21 @@
37
37
  "@cypress/webpack-preprocessor": "^5.7.0",
38
38
  "@testing-library/jest-dom": "^5.14.1",
39
39
  "@testing-library/react": "^12.1.2",
40
- "@toptal/davinci-cli-shared": "1.5.2-alpha-fx-change-https-port.19+aec34d7c",
41
- "@types/jest": "^27.0.3",
42
- "babel-jest": "^26.3.0",
40
+ "@toptal/davinci-cli-shared": "1.5.2-alpha-chore-upgrade-jest-27-v.23+ddc420b7",
41
+ "@types/jest": "^27.4.1",
42
+ "babel-jest": "^27.5.1",
43
43
  "cypress": "^9.4.1",
44
+ "enhanced-resolve": "^5.9.2",
44
45
  "fs-extra": "^10.0.0",
45
46
  "glob": "^7.2.0",
46
- "jest": "^26.6.3",
47
- "jest-html-reporters": "^2.1.6",
48
- "jest-junit": "^13.0.0",
47
+ "jest": "^27.5.1",
48
+ "jest-html-reporters": "^3.0.6",
49
+ "jest-junit": "^13.1.0",
49
50
  "jest-silent-reporter": "^0.5.0",
50
- "jest-styled-components": "^7.0.3",
51
- "jsdom": "^16.5.2",
51
+ "jest-styled-components": "^7.0.8",
52
+ "jsdom": "^19.0.0",
52
53
  "matchmedia-polyfill": "^0.3.2",
53
54
  "semver": "^7.3.2"
54
55
  },
55
- "gitHead": "aec34d7ce6ddebd137b999b111f5f43239f2c462"
56
+ "gitHead": "ddc420b743d013a8c52ccac46a7c0e3c35e7329c"
56
57
  }
@@ -18,6 +18,9 @@ const options = {
18
18
  },
19
19
  ],
20
20
  },
21
+ resolve: {
22
+ extensions: ['.tsx', '.ts', '.jsx', '.js'],
23
+ },
21
24
  },
22
25
  watchOptions: {}
23
26
  }
@@ -0,0 +1,18 @@
1
+ // temporary workaround - https://github.com/facebook/jest/issues/9771#issuecomment-871585234
2
+ const exportMapsResolver = require('enhanced-resolve').create.sync({
3
+ conditionNames: ['require', 'node', 'default'],
4
+ extensions: ['.js', '.json', '.node', '.ts', '.tsx'],
5
+ });
6
+
7
+ /**
8
+ * @param request {unknown}
9
+ * @param options {{ defaultResolver(...args: unknown[]): unknown, basedir: unknown }}
10
+ * @returns {unknown}
11
+ */
12
+ module.exports = function (request, options) {
13
+ // list global module that must be resolved by defaultResolver here
14
+ if (['fs', 'http', 'path'].includes(request)) {
15
+ return options.defaultResolver(request, options);
16
+ }
17
+ return exportMapsResolver(options.basedir, request);
18
+ };
@@ -23,6 +23,7 @@ async function readFile(path) {
23
23
  readFile(userJestConfigPath)
24
24
 
25
25
  module.exports = {
26
+ testEnvironment: 'jsdom',
26
27
  /**
27
28
  * Fix for the https://github.com/facebook/jest/issues/9698
28
29
  */