mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
feat: upgrade to jest 24 (#4868)
This commit is contained in:
parent
8678d0d6ab
commit
90ba0cd6b7
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'] : [])
|
||||
]
|
||||
}
|
||||
|
@ -30,9 +30,8 @@
|
||||
"@nuxtjs/eslint-config": "^0.0.1",
|
||||
"@vue/server-test-utils": "^1.0.0-beta.29",
|
||||
"@vue/test-utils": "^1.0.0-beta.29",
|
||||
"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",
|
||||
@ -56,8 +55,7 @@
|
||||
"get-port": "^4.1.0",
|
||||
"glob": "^7.1.3",
|
||||
"is-wsl": "^1.1.0",
|
||||
"jest": "^23.6.0",
|
||||
"jest-junit": "^6.2.1",
|
||||
"jest": "^24.1.0",
|
||||
"jsdom": "^13.2.0",
|
||||
"klaw-sync": "^6.0.0",
|
||||
"lerna": "3.11.1",
|
||||
@ -82,7 +80,7 @@
|
||||
"ts-loader": "^5.3.3",
|
||||
"tslint": "^5.12.1",
|
||||
"typescript": "^3.3.3",
|
||||
"vue-jest": "^3.0.3",
|
||||
"vue-jest": "^4.0.0-0",
|
||||
"vue-property-decorator": "^7.3.0"
|
||||
},
|
||||
"repository": {
|
||||
|
@ -1,11 +1,9 @@
|
||||
import { loadFixture, Nuxt } from '../utils'
|
||||
|
||||
let nuxt = null
|
||||
|
||||
describe.posix('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