mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
fix test script
This commit is contained in:
parent
c4068c3a70
commit
584b943688
@ -42,7 +42,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build-fixtures": "./scripts/build-fixtures",
|
||||
"test": "npm run lint && jest",
|
||||
"test": "npm run lint && npm run build-fixtures && jest",
|
||||
"test-appveyor": "yarn test",
|
||||
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
|
||||
"lint": "eslint --ext .js,.mjs,.vue bin/* build/ lib/ test/ examples/",
|
||||
|
@ -12,7 +12,8 @@ describe('basic browser', () => {
|
||||
beforeAll(async () => {
|
||||
const config = loadFixture('basic')
|
||||
nuxt = new Nuxt(config)
|
||||
port = await getPort() ; await nuxt.listen(port, 'localhost')
|
||||
port = await getPort()
|
||||
await nuxt.listen(port, 'localhost')
|
||||
|
||||
await browser.start({
|
||||
// slowMo: 50,
|
||||
|
@ -7,7 +7,6 @@ import finalhandler from 'finalhandler'
|
||||
import rp from 'request-promise-native'
|
||||
import { Nuxt, Generator } from '..'
|
||||
import { loadFixture, getPort } from './utils'
|
||||
import { get } from 'https';
|
||||
|
||||
let port
|
||||
const url = route => 'http://localhost:' + port + route
|
||||
|
@ -45,7 +45,7 @@ const uniqueTest = async (url) => {
|
||||
// The idea of this test is to ensure there is no memory or data leak during SSR requests
|
||||
// Or pending promises/sockets and function calls.
|
||||
// Related issue: https://github.com/nuxt/nuxt.js/issues/1354
|
||||
const stressTest = async (_url, concurrency = 2, steps = 4) => {port = await getPort() ; await nuxt.listen(port, 'localhost')
|
||||
const stressTest = async (_url, concurrency = 2, steps = 4) => {
|
||||
let statusCodes = {}
|
||||
|
||||
await Utils.sequence(range(steps), async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user