Skip to content

Commit

Permalink
chore: upgrade jest example to jest@17
Browse files Browse the repository at this point in the history
replace the patch with setting enableSymlinks to true. ref: bazelbuild#2338
  • Loading branch information
cuyl committed Jun 12, 2021
1 parent f4af2ce commit 507d776
Show file tree
Hide file tree
Showing 6 changed files with 1,611 additions and 1,805 deletions.
4 changes: 1 addition & 3 deletions examples/jest/WORKSPACE
Expand Up @@ -29,9 +29,7 @@ load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")

yarn_install(
name = "npm",
data = [
"//:patches/jest-haste-map+24.9.0.patch",
],
exports_directories_only = True,
package_json = "//:package.json",
quiet = False,
yarn_lock = "//:yarn.lock",
Expand Down
3 changes: 3 additions & 0 deletions examples/jest/jest.config.js
Expand Up @@ -2,6 +2,9 @@ const path = require('path');

module.exports = {
testEnvironment: 'node',
haste: {
enableSymlinks: true,
},
reporters: ['default', './jest-reporter'],
// explicitly specify the path to babel.config.js relative to jest.config.js so
// jest can find it even when jest.config.js is not in the root folder of the workspace
Expand Down
3 changes: 3 additions & 0 deletions examples/jest/jest.ts.config.js
@@ -1,5 +1,8 @@
module.exports = {
testEnvironment: 'node',
haste: {
enableSymlinks: true,
},
reporters: ['default'],
testMatch: ['**/*.test.js'],
moduleNameMapper: {
Expand Down
14 changes: 6 additions & 8 deletions examples/jest/package.json
Expand Up @@ -6,17 +6,15 @@
"@babel/core": "^7.6.0",
"@babel/preset-env": "^7.6.0",
"@bazel/typescript": "^3.6.0",
"@jest/core": "24.7.1",
"@jest/transform": "24.7.1",
"@types/jest": "^26.0.15",
"babel-jest": "24.7.1",
"babel-plugin-istanbul": "5.1.2",
"jest-cli": "24.9.0",
"patch-package": "^6.2.0",
"@jest/core": "27.0.3",
"@jest/transform": "27.0.2",
"@types/jest": "^26.0.23",
"babel-jest": "27.0.2",
"babel-plugin-istanbul": "6.0.0",
"jest-cli": "27.0.3",
"typescript": "~4.2.0"
},
"scripts": {
"postinstall": "patch-package",
"test": "bazel test ..."
}
}
16 changes: 0 additions & 16 deletions examples/jest/patches/jest-haste-map+24.9.0.patch

This file was deleted.

0 comments on commit 507d776

Please sign in to comment.