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
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
# Junit report from jest-junit
|
||||
*junit.xml
|
||||
|
||||
|
@ -20,15 +20,9 @@ steps:
|
||||
displayName: 'Install dependencies'
|
||||
|
||||
- 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'
|
||||
|
||||
- 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'
|
||||
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testResultsFormat: 'JUnit'
|
||||
testResultsFiles: 'test-*.xml'
|
||||
displayName: 'Publish test results to Azure Pipelines'
|
||||
|
@ -14,9 +14,8 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.1.2",
|
||||
"@vue/test-utils": "^1.0.0-beta.25",
|
||||
"babel-core": "^7.0.0-bridge.0",
|
||||
"babel-jest": "^23.6.0",
|
||||
"jest": "^23.6.0",
|
||||
"babel-jest": "^24.0.0",
|
||||
"jest": "^24.0.0",
|
||||
"jest-serializer-vue": "^2.0.2",
|
||||
"vue-jest": "^3.0.2"
|
||||
},
|
||||
|
@ -9,8 +9,7 @@ module.exports = {
|
||||
// But its performance overhead is pretty bad (30+%).
|
||||
// detectOpenHandles: true
|
||||
|
||||
// setupFilesAfterEnv: ['./test/utils/setup'],
|
||||
setupTestFrameworkScriptFile: './test/utils/setup',
|
||||
setupFilesAfterEnv: ['./test/utils/setup'],
|
||||
|
||||
coverageDirectory: './coverage',
|
||||
|
||||
@ -36,16 +35,12 @@ module.exports = {
|
||||
transform: {
|
||||
'^.+\\.ts$': 'ts-jest',
|
||||
'^.+\\.js$': 'babel-jest',
|
||||
'.*\\.(vue)$': 'vue-jest'
|
||||
'^.+\\.vue$': 'vue-jest'
|
||||
},
|
||||
|
||||
moduleFileExtensions: [
|
||||
'ts',
|
||||
'js',
|
||||
'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/preset-env": "^7.3.1",
|
||||
"@nuxtjs/eslint-config": "^0.0.1",
|
||||
"babel-core": "^7.0.0-bridge",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"babel-jest": "^23.6.0",
|
||||
"babel-jest": "^24.1.0",
|
||||
"babel-plugin-dynamic-import-node": "^2.2.0",
|
||||
"cheerio": "^1.0.0-rc.2",
|
||||
"codecov": "^3.1.0",
|
||||
@ -54,8 +53,7 @@
|
||||
"get-port": "^4.1.0",
|
||||
"glob": "^7.1.3",
|
||||
"is-wsl": "^1.1.0",
|
||||
"jest": "^23.6.0",
|
||||
"jest-junit": "^6.1.0",
|
||||
"jest": "^24.0.0",
|
||||
"jsdom": "^13.2.0",
|
||||
"klaw-sync": "^6.0.0",
|
||||
"lerna": "3.10.8",
|
||||
@ -76,11 +74,11 @@
|
||||
"rollup-plugin-node-resolve": "^4.0.0",
|
||||
"rollup-plugin-replace": "^2.1.0",
|
||||
"sort-package-json": "^1.18.0",
|
||||
"ts-jest": "^23.10.5",
|
||||
"ts-jest": "^24.0.0",
|
||||
"ts-loader": "^5.3.3",
|
||||
"tslint": "^5.12.1",
|
||||
"typescript": "^3.2.4",
|
||||
"vue-jest": "^3.0.2",
|
||||
"vue-jest": "^4.0.0-0",
|
||||
"vue-property-decorator": "^7.3.0",
|
||||
"which": "^1.3.1"
|
||||
},
|
||||
|
@ -1,11 +1,9 @@
|
||||
import { loadFixture, Nuxt } from '../utils'
|
||||
|
||||
let nuxt = null
|
||||
|
||||
describe.skip.win('basic sockets', () => {
|
||||
test('/', async () => {
|
||||
const options = await loadFixture('sockets')
|
||||
nuxt = new Nuxt(options)
|
||||
const nuxt = new Nuxt(options)
|
||||
await nuxt.server.listen()
|
||||
|
||||
const { html } = await nuxt.server.renderRoute('/')
|
||||
|
Loading…
Reference in New Issue
Block a user