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