Skip to content

Commit a04c5e9

Browse files
committed
feat!: no longer auto-load jest-extended
v6 is significantly different from v4, do not lock in on a specific version
1 parent aa5a4bc commit a04c5e9

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@
147147
"c8": "^9.1.0",
148148
"expect": "^30.2.0",
149149
"fast-glob": "^3.2.11",
150-
"jest-extended": "^4.0.2",
151150
"playwright-core": "^1.52.0",
152151
"pretty-format": "^30.2.0",
153152
"puppeteer-core": "^24.14.0",
@@ -164,6 +163,7 @@
164163
"eslint": "^8.44.0",
165164
"esvu": "^1.2.16",
166165
"jest": "^29.7.0",
166+
"jest-extended": "^4.0.2",
167167
"jest-matcher-utils": "^29.7.0",
168168
"jest-serializer-ansi-escapes": "^3.0.0",
169169
"jest-when": "^3.6.0",

pnpm-lock.yaml

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/expect.cjs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ function loadExpect(loadReason) {
2525
}
2626

2727
// console.log('expect load reason:', loadReason)
28-
try {
29-
expect.extend(require('jest-extended'))
30-
} catch {}
31-
3228
for (const x of extend) expect.extend(...x)
3329
for (const [key, value] of set) expect[key] = value
3430
fixupAssertions()

tests/jest-extended/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"type": "module",
33
"jest": {
4+
"setupFilesAfterEnv": [
5+
"jest-extended/all"
6+
],
47
"snapshotFormat": {
58
"escapeString": false,
69
"printBasicPrototype": false

0 commit comments

Comments
 (0)