Przeglądaj źródła

chore(deps): update jest to v27 (#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 https://github.com/facebook/jest/pull/11721
Cédric Exbrayat 4 lat temu
rodzic
commit
b49f446ad0

+ 1 - 0
jest.config.js

@@ -1,4 +1,5 @@
 module.exports = {
+  testEnvironment: 'jsdom',
   preset: 'ts-jest',
   setupFilesAfterEnv: ['./scripts/setupJestEnv.ts'],
   globals: {

+ 3 - 3
package.json

@@ -52,7 +52,7 @@
     "@rollup/plugin-node-resolve": "^11.2.1",
     "@rollup/plugin-replace": "^2.3.4",
     "@types/hash-sum": "^1.0.0",
-    "@types/jest": "^26.0.16",
+    "@types/jest": "^27.0.1",
     "@types/node": "^16.4.7",
     "@types/puppeteer": "^5.0.0",
     "@typescript-eslint/parser": "^4.1.1",
@@ -64,7 +64,7 @@
     "eslint": "^7.7.0",
     "execa": "^4.0.2",
     "fs-extra": "^9.0.1",
-    "jest": "^26.0.1",
+    "jest": "^27.1.0",
     "lint-staged": "^10.2.10",
     "minimist": "^1.2.0",
     "npm-run-all": "^4.1.5",
@@ -78,7 +78,7 @@
     "rollup-plugin-typescript2": "^0.27.2",
     "semver": "^7.3.2",
     "serve": "^12.0.0",
-    "ts-jest": "^26.2.0",
+    "ts-jest": "^27.0.5",
     "typescript": "^4.2.2",
     "yorkie": "^2.0.0"
   }

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

@@ -157,7 +157,7 @@ describe('INSTANCE_EVENT_EMITTER', () => {
   })
 
   it('$off event + fn', () => {
-    const spy2 = jasmine.createSpy('emitter')
+    const spy2 = jest.fn()
     vm.$on('test', spy)
     vm.$on('test', spy2)
     vm.$off('test', spy)

+ 1 - 1
packages/vue/examples/__tests__/grid.spec.ts

@@ -16,7 +16,7 @@ describe('e2e: grid', () => {
       for (let j = 0; j < columns.length; j++) {
         expect(
           await text(`tr:nth-child(${i + 1}) td:nth-child(${j + 1})`)
-        ).toContain(data[i][columns[j]])
+        ).toContain(`${data[i][columns[j]]}`)
       }
     }
   }

Plik diff jest za duży
+ 201 - 397
yarn.lock


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików