fix test script

This commit is contained in:
Pooya Parsa 2018-03-19 03:23:36 +03:30
parent c4068c3a70
commit 584b943688
4 changed files with 4 additions and 4 deletions

View File

@ -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/",

View File

@ -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,

View File

@ -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

View File

@ -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 () => {