test: update jest to v26 (#7319)

This commit is contained in:
Xin Du (Clark) 2020-05-05 22:53:07 +01:00 committed by GitHub
parent 37271f8ac4
commit 8c7228f1e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 522 additions and 543 deletions

View File

@ -32,9 +32,9 @@
"audit": "improved-yarn-audit --ignore-dev-deps --min-severity moderate -e 1488" "audit": "improved-yarn-audit --ignore-dev-deps --min-severity moderate -e 1488"
}, },
"devDependencies": { "devDependencies": {
"@ls-lint/ls-lint": "^1.8.1",
"@babel/core": "^7.9.0", "@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.5", "@babel/preset-env": "^7.9.5",
"@ls-lint/ls-lint": "^1.8.1",
"@nuxtjs/eslint-config": "^2.0.2", "@nuxtjs/eslint-config": "^2.0.2",
"@rollup/plugin-alias": "^3.1.0", "@rollup/plugin-alias": "^3.1.0",
"@rollup/plugin-commonjs": "^11.0.2", "@rollup/plugin-commonjs": "^11.0.2",
@ -44,7 +44,7 @@
"@vue/server-test-utils": "^1.0.0-beta.33", "@vue/server-test-utils": "^1.0.0-beta.33",
"@vue/test-utils": "^1.0.0-beta.33", "@vue/test-utils": "^1.0.0-beta.33",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"babel-jest": "^25.4.0", "babel-jest": "^26.0.1",
"consola": "^2.11.3", "consola": "^2.11.3",
"cross-spawn": "^7.0.2", "cross-spawn": "^7.0.2",
"eslint": "6.8.0", "eslint": "6.8.0",
@ -59,7 +59,7 @@
"got": "^11.0.2", "got": "^11.0.2",
"improved-yarn-audit": "^2.0.0", "improved-yarn-audit": "^2.0.0",
"is-wsl": "^2.1.1", "is-wsl": "^2.1.1",
"jest": "^25.4.0", "jest": "^26.0.1",
"jsdom": "^16.2.2", "jsdom": "^16.2.2",
"klaw-sync": "^6.0.0", "klaw-sync": "^6.0.0",
"lerna": "^3.20.2", "lerna": "^3.20.2",

View File

@ -2,7 +2,7 @@ import path from 'path'
import util from 'util' import util from 'util'
import consola from 'consola' import consola from 'consola'
import prettyFormat from 'pretty-format' import prettyFormat from 'pretty-format'
import { NuxtCommand, getWebpackConfig } from '../..' import { NuxtCommand, getWebpackConfig } from '../../src/index'
import webpackCommand from '../../src/commands/webpack' import webpackCommand from '../../src/commands/webpack'
const replaceAll = (str, a, b) => str.split(a).join(b) const replaceAll = (str, a, b) => str.split(a).join(b)

View File

@ -15,6 +15,8 @@ chalk.level = 0
jest.setTimeout(60000) jest.setTimeout(60000)
jest.mock('esm', () => () => require)
consola.mockTypes(() => jest.fn()) consola.mockTypes(() => jest.fn())
function errorTrap (error) { function errorTrap (error) {

1055
yarn.lock

File diff suppressed because it is too large Load Diff