Skip to content

Commit

Permalink
Fix canary tests on CIs (travis, appveyor) (#3375)
Browse files Browse the repository at this point in the history
* Dump address.

* Use zero as the port.

* Limit test cases.

* throw address.

* Fail a specific error.

* Set a port manually.

* Make sure jest is working properly.

* Set the jest timeout time to 5 min.

* Run the actual test

* Run all production tests on Travis.

* Set the Jest default timeout to 5 min for all integration tests.

* Remove production only testing.

* Remove unwanted console.log

* Remove the addition number from test case

* Set the static export test jest timeout to 5 min.

* Run tests again if they failed once.
  • Loading branch information
arunoda authored Dec 3, 2017
1 parent 6ad5470 commit f6bd1df
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
"pretestonly": "taskr pretest",
"testonly": "cross-env NODE_PATH=test/lib jest \\.test.js",
"posttestonly": "taskr posttest",
"testall": "npm run testonly -- --coverage --forceExit --runInBand --verbose --bail",
"pretest": "npm run lint",
"test": "npm run testonly -- --coverage --forceExit --runInBand --verbose --bail",
"test": "cross-env npm run testall || npm run testall",
"coveralls": "nyc --instrument=false --source-map=false report --temp-directory=./coverage --reporter=text-lcov | coveralls",
"lint": "standard 'bin/*' 'client/**/*.js' 'examples/**/*.js' 'lib/**/*.js' 'pages/**/*.js' 'server/**/*.js' 'test/**/*.js'",
"prepublish": "npm run release",
Expand Down
2 changes: 1 addition & 1 deletion test/integration/basic/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import hmr from './hmr'
import dynamic from './dynamic'

const context = {}
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5

describe('Basic Features', () => {
beforeAll(async () => {
Expand Down
2 changes: 1 addition & 1 deletion test/integration/dist-dir/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const appDir = join(__dirname, '../')
let appPort
let server
let app
jasmine.DEFAULT_TIMEOUT_INTERVAL = 40000
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5

describe('Production Usage', () => {
beforeAll(async () => {
Expand Down
2 changes: 1 addition & 1 deletion test/integration/ondemand/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {

const context = {}

jasmine.DEFAULT_TIMEOUT_INTERVAL = 40000
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5

describe('On Demand Entries', () => {
it('should pass', () => {})
Expand Down
2 changes: 1 addition & 1 deletion test/integration/production/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const appDir = join(__dirname, '../')
let appPort
let server
let app
jasmine.DEFAULT_TIMEOUT_INTERVAL = 40000
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5

const context = {}

Expand Down
3 changes: 2 additions & 1 deletion test/integration/static/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import {
import ssr from './ssr'
import browser from './browser'

jasmine.DEFAULT_TIMEOUT_INTERVAL = 40000
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5

const appDir = join(__dirname, '../')
const context = {}

Expand Down

0 comments on commit f6bd1df

Please sign in to comment.