mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
feat: upgrade to jest 24 (#4868)
This commit is contained in:
parent
a9d9bbe207
commit
b8ddfe95cd
4
.gitignore
vendored
4
.gitignore
vendored
@ -54,7 +54,3 @@ coverage
|
|||||||
Network Trash Folder
|
Network Trash Folder
|
||||||
Temporary Items
|
Temporary Items
|
||||||
.apdisk
|
.apdisk
|
||||||
|
|
||||||
# Junit report from jest-junit
|
|
||||||
*junit.xml
|
|
||||||
|
|
||||||
|
@ -20,15 +20,9 @@ steps:
|
|||||||
displayName: 'Install dependencies'
|
displayName: 'Install dependencies'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set JEST_JUNIT_OUTPUT=test-fixtures-junit.xml && set NODE_OPTIONS=--max_old_space_size=4096 && yarn test:fixtures -i
|
set NODE_OPTIONS=--max_old_space_size=4096 && yarn test:fixtures -i
|
||||||
displayName: 'Test: Build Fixtures'
|
displayName: 'Test: Build Fixtures'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set JEST_JUNIT_OUTPUT=test-unit-junit.xml && set NODE_OPTIONS=--max_old_space_size=4096 && yarn test:unit -w=2
|
set NODE_OPTIONS=--max_old_space_size=4096 && yarn test:unit -w=2
|
||||||
displayName: 'Test: Run unit tests'
|
displayName: 'Test: Run unit tests'
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
|
||||||
inputs:
|
|
||||||
testResultsFormat: 'JUnit'
|
|
||||||
testResultsFiles: 'test-*.xml'
|
|
||||||
displayName: 'Publish test results to Azure Pipelines'
|
|
||||||
|
@ -14,9 +14,8 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.1.2",
|
"@babel/core": "^7.1.2",
|
||||||
"@vue/test-utils": "^1.0.0-beta.25",
|
"@vue/test-utils": "^1.0.0-beta.25",
|
||||||
"babel-core": "^7.0.0-bridge.0",
|
"babel-jest": "^24.0.0",
|
||||||
"babel-jest": "^23.6.0",
|
"jest": "^24.0.0",
|
||||||
"jest": "^23.6.0",
|
|
||||||
"jest-serializer-vue": "^2.0.2",
|
"jest-serializer-vue": "^2.0.2",
|
||||||
"vue-jest": "^3.0.2"
|
"vue-jest": "^3.0.2"
|
||||||
},
|
},
|
||||||
|
@ -9,8 +9,7 @@ module.exports = {
|
|||||||
// But its performance overhead is pretty bad (30+%).
|
// But its performance overhead is pretty bad (30+%).
|
||||||
// detectOpenHandles: true
|
// detectOpenHandles: true
|
||||||
|
|
||||||
// setupFilesAfterEnv: ['./test/utils/setup'],
|
setupFilesAfterEnv: ['./test/utils/setup'],
|
||||||
setupTestFrameworkScriptFile: './test/utils/setup',
|
|
||||||
|
|
||||||
coverageDirectory: './coverage',
|
coverageDirectory: './coverage',
|
||||||
|
|
||||||
@ -36,16 +35,12 @@ module.exports = {
|
|||||||
transform: {
|
transform: {
|
||||||
'^.+\\.ts$': 'ts-jest',
|
'^.+\\.ts$': 'ts-jest',
|
||||||
'^.+\\.js$': 'babel-jest',
|
'^.+\\.js$': 'babel-jest',
|
||||||
'.*\\.(vue)$': 'vue-jest'
|
'^.+\\.vue$': 'vue-jest'
|
||||||
},
|
},
|
||||||
|
|
||||||
moduleFileExtensions: [
|
moduleFileExtensions: [
|
||||||
'ts',
|
'ts',
|
||||||
'js',
|
'js',
|
||||||
'json'
|
'json'
|
||||||
],
|
]
|
||||||
|
|
||||||
reporters: [
|
|
||||||
'default'
|
|
||||||
].concat(process.env.JEST_JUNIT_OUTPUT ? ['jest-junit'] : [])
|
|
||||||
}
|
}
|
||||||
|
10
package.json
10
package.json
@ -28,9 +28,8 @@
|
|||||||
"@babel/core": "^7.2.2",
|
"@babel/core": "^7.2.2",
|
||||||
"@babel/preset-env": "^7.3.1",
|
"@babel/preset-env": "^7.3.1",
|
||||||
"@nuxtjs/eslint-config": "^0.0.1",
|
"@nuxtjs/eslint-config": "^0.0.1",
|
||||||
"babel-core": "^7.0.0-bridge",
|
|
||||||
"babel-eslint": "^10.0.1",
|
"babel-eslint": "^10.0.1",
|
||||||
"babel-jest": "^23.6.0",
|
"babel-jest": "^24.1.0",
|
||||||
"babel-plugin-dynamic-import-node": "^2.2.0",
|
"babel-plugin-dynamic-import-node": "^2.2.0",
|
||||||
"cheerio": "^1.0.0-rc.2",
|
"cheerio": "^1.0.0-rc.2",
|
||||||
"codecov": "^3.1.0",
|
"codecov": "^3.1.0",
|
||||||
@ -54,8 +53,7 @@
|
|||||||
"get-port": "^4.1.0",
|
"get-port": "^4.1.0",
|
||||||
"glob": "^7.1.3",
|
"glob": "^7.1.3",
|
||||||
"is-wsl": "^1.1.0",
|
"is-wsl": "^1.1.0",
|
||||||
"jest": "^23.6.0",
|
"jest": "^24.0.0",
|
||||||
"jest-junit": "^6.1.0",
|
|
||||||
"jsdom": "^13.2.0",
|
"jsdom": "^13.2.0",
|
||||||
"klaw-sync": "^6.0.0",
|
"klaw-sync": "^6.0.0",
|
||||||
"lerna": "3.10.8",
|
"lerna": "3.10.8",
|
||||||
@ -76,11 +74,11 @@
|
|||||||
"rollup-plugin-node-resolve": "^4.0.0",
|
"rollup-plugin-node-resolve": "^4.0.0",
|
||||||
"rollup-plugin-replace": "^2.1.0",
|
"rollup-plugin-replace": "^2.1.0",
|
||||||
"sort-package-json": "^1.18.0",
|
"sort-package-json": "^1.18.0",
|
||||||
"ts-jest": "^23.10.5",
|
"ts-jest": "^24.0.0",
|
||||||
"ts-loader": "^5.3.3",
|
"ts-loader": "^5.3.3",
|
||||||
"tslint": "^5.12.1",
|
"tslint": "^5.12.1",
|
||||||
"typescript": "^3.2.4",
|
"typescript": "^3.2.4",
|
||||||
"vue-jest": "^3.0.2",
|
"vue-jest": "^4.0.0-0",
|
||||||
"vue-property-decorator": "^7.3.0",
|
"vue-property-decorator": "^7.3.0",
|
||||||
"which": "^1.3.1"
|
"which": "^1.3.1"
|
||||||
},
|
},
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
import { loadFixture, Nuxt } from '../utils'
|
import { loadFixture, Nuxt } from '../utils'
|
||||||
|
|
||||||
let nuxt = null
|
|
||||||
|
|
||||||
describe.skip.win('basic sockets', () => {
|
describe.skip.win('basic sockets', () => {
|
||||||
test('/', async () => {
|
test('/', async () => {
|
||||||
const options = await loadFixture('sockets')
|
const options = await loadFixture('sockets')
|
||||||
nuxt = new Nuxt(options)
|
const nuxt = new Nuxt(options)
|
||||||
await nuxt.server.listen()
|
await nuxt.server.listen()
|
||||||
|
|
||||||
const { html } = await nuxt.server.renderRoute('/')
|
const { html } = await nuxt.server.renderRoute('/')
|
||||||
|
Loading…
Reference in New Issue
Block a user