Skip to content

Commit

Permalink
Upgrade Jest to 29.3.0, remove local patch
Browse files Browse the repository at this point in the history
  • Loading branch information
kachkaev committed Nov 7, 2022
1 parent 5dc8f10 commit 212dd93
Show file tree
Hide file tree
Showing 5 changed files with 374 additions and 491 deletions.
70 changes: 0 additions & 70 deletions .yarn/patches/jest-runtime-npm-29.1.2-567b60ffd5.patch

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -46,13 +46,13 @@ The demo was created while working on [blockprotocol/blockprotocol](https://gith
yarn workspace web-app exe scripts/wasm-package-answer.ts
```

1. 🎉 Run unit tests ([patched](./.yarn/patches) Jest) referring to the `wasm-package`:
1. 🎉 Run unit tests referring to the `wasm-package`:

```sh
yarn workspace web-app test
```

For built-in support of WASM in Jest see [facebook/jest#11011 (comment)](https://github.com/facebook/jest/issues/11011#issuecomment-1278111232).
Needs Jest `>=29.3.0`, see [facebook/jest#13505](https://github.com/facebook/jest/pull/13505).

1. 🎉 Run Next.js dev server and check if `wasm-package` works there too:

Expand Down
5 changes: 1 addition & 4 deletions package.json
Expand Up @@ -10,8 +10,5 @@
"prettier": "^2.7.1",
"replace-in-file": "^6.3.5"
},
"packageManager": "yarn@4.0.0-rc.25",
"resolutions": {
"jest-runtime@npm:^29.1.2": "patch:jest-runtime@npm%3A29.1.2#~/.yarn/patches/jest-runtime-npm-29.1.2-567b60ffd5.patch"
}
"packageManager": "yarn@4.0.0-rc.25"
}
8 changes: 4 additions & 4 deletions web-app/package.json
Expand Up @@ -6,8 +6,8 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"exe": "node --require=./suppress-experimental-warnings.cjs --loader=ts-node/esm/transpile-only --experimental-modules --experimental-wasm-modules --experimental-vm-modules --experimental-specifier-resolution=node",
"test": "yarn exe ./node_modules/.bin/jest"
"exe": "node --require=./suppress-experimental-warnings.cjs --loader=ts-node/esm/transpile-only --experimental-modules --experimental-vm-modules --experimental-specifier-resolution=node",
"test": "yarn exe $(yarn bin jest)"
},
"dependencies": {
"next": "^12.3.2-canary.27",
Expand All @@ -16,9 +16,9 @@
"wasm-package": "0.0.0-local"
},
"devDependencies": {
"@types/jest": "^29.1.2",
"@types/jest": "^29.2.2",
"@types/react": "18.0.21",
"jest": "^29.1.2",
"jest": "^29.3.0",
"ts-jest": "^29.0.3",
"ts-node": "^10.9.1",
"typescript": "^4.8.4"
Expand Down

0 comments on commit 212dd93

Please sign in to comment.