Skip to content

Commit b49f446

Browse files
authored
chore(deps): update jest to v27 (vuejs#4472)
Updates jest and ts-jest to v27, as jest v27.1.0 includes a necessary fix to unblock further work on spying issues. See jestjs/jest#11721
1 parent b9b28e2 commit b49f446

File tree

5 files changed

+574
-1187
lines changed

5 files changed

+574
-1187
lines changed

jest.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
module.exports = {
2+
testEnvironment: 'jsdom',
23
preset: 'ts-jest',
34
setupFilesAfterEnv: ['./scripts/setupJestEnv.ts'],
45
globals: {

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"@rollup/plugin-node-resolve": "^11.2.1",
5353
"@rollup/plugin-replace": "^2.3.4",
5454
"@types/hash-sum": "^1.0.0",
55-
"@types/jest": "^26.0.16",
55+
"@types/jest": "^27.0.1",
5656
"@types/node": "^16.4.7",
5757
"@types/puppeteer": "^5.0.0",
5858
"@typescript-eslint/parser": "^4.1.1",
@@ -64,7 +64,7 @@
6464
"eslint": "^7.7.0",
6565
"execa": "^4.0.2",
6666
"fs-extra": "^9.0.1",
67-
"jest": "^26.0.1",
67+
"jest": "^27.1.0",
6868
"lint-staged": "^10.2.10",
6969
"minimist": "^1.2.0",
7070
"npm-run-all": "^4.1.5",
@@ -78,7 +78,7 @@
7878
"rollup-plugin-typescript2": "^0.27.2",
7979
"semver": "^7.3.2",
8080
"serve": "^12.0.0",
81-
"ts-jest": "^26.2.0",
81+
"ts-jest": "^27.0.5",
8282
"typescript": "^4.2.2",
8383
"yorkie": "^2.0.0"
8484
}

packages/vue-compat/__tests__/instance.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ describe('INSTANCE_EVENT_EMITTER', () => {
157157
})
158158

159159
it('$off event + fn', () => {
160-
const spy2 = jasmine.createSpy('emitter')
160+
const spy2 = jest.fn()
161161
vm.$on('test', spy)
162162
vm.$on('test', spy2)
163163
vm.$off('test', spy)

packages/vue/examples/__tests__/grid.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('e2e: grid', () => {
1616
for (let j = 0; j < columns.length; j++) {
1717
expect(
1818
await text(`tr:nth-child(${i + 1}) td:nth-child(${j + 1})`)
19-
).toContain(data[i][columns[j]])
19+
).toContain(`${data[i][columns[j]]}`)
2020
}
2121
}
2222
}

0 commit comments

Comments
 (0)