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: bazel-contrib#2338
  • Loading branch information
cuyl committed Jun 11, 2021
1 parent f4af2ce commit 57d230a
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
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")

yarn_install(
name = "npm",
data = [
"//:patches/jest-haste-map+24.9.0.patch",
],
package_json = "//:package.json",
quiet = False,
yarn_lock = "//:yarn.lock",
exports_directories_only = True,
)
3 changes: 3 additions & 0 deletions examples/jest/jest.config.js
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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.

Loading

0 comments on commit 57d230a

Please sign in to comment.