File tree Expand file tree Collapse file tree 9 files changed +52
-62
lines changed Expand file tree Collapse file tree 9 files changed +52
-62
lines changed Original file line number Diff line number Diff line change 11language : node_js
22node_js :
3- - ' 4'
4- - ' 6'
5- - ' 8'
3+ - ' 4'
4+ - ' 6'
5+ - ' 8'
6+ - node
67sudo : false
78git :
89 depth : 1
910notifications :
10- irc : irc.freenode.org#socket.io
11+ irc : ' irc.freenode.org#socket.io'
1112matrix :
1213 include :
13- - node_js : ' node'
14- env : BROWSER_NAME=chrome BROWSER_VERSION=latest
15- - node_js : ' node'
16- env : BROWSER_NAME=safari BROWSER_VERSION=latest
17- - node_js : ' node'
18- env : BROWSER_NAME=firefox BROWSER_VERSION=latest
19- - node_js : ' node'
20- env : BROWSER_NAME=ie BROWSER_VERSION=8
21- - node_js : ' node'
22- env : BROWSER_NAME=ie BROWSER_VERSION=9
23- - node_js : ' node'
24- env : BROWSER_NAME=ie BROWSER_VERSION=10
25- - node_js : ' node'
26- env : BROWSER_NAME=ie BROWSER_VERSION=11
27- - node_js : ' node'
28- env : BROWSER_NAME=microsoftedge BROWSER_VERSION=latest
29- - node_js : ' node'
30- env : BROWSER_NAME=iphone BROWSER_VERSION=8.4
31- - node_js : ' node'
32- env : BROWSER_NAME=iphone BROWSER_VERSION=9.2
33- - node_js : ' node'
34- env : BROWSER_NAME=iphone BROWSER_VERSION=10.0
35- - node_js : ' node'
36- env : BROWSER_NAME=android BROWSER_VERSION=4.4
37- - node_js : ' node'
38- env : BROWSER_NAME=android BROWSER_VERSION=5.1
39- - node_js : ' node'
40- env : BROWSER_NAME=ipad BROWSER_VERSION=9.3
41- - node_js : ' node'
42- env : BROWSER_NAME=ipad BROWSER_VERSION=10.0
14+ - node_js : node
15+ env : BROWSERS=1
16+ cache :
17+ directories :
18+ - node_modules
19+ env :
20+ global :
21+ - secure : >-
22+ QYaPt9wtF7Vm+kRPaGNAaCRP/E74gjxA7T0k1GqPYIs2xDiuhU/ef03pzWIjBB+6z0GGnsQ4rG+6JlM1lsthTMEDcegbp6/XKZkqZqWUaJmCy7U41J2mJutwli6ZV9VAqh5pi0mfe5elAqeh/fx+GhFbtu6JzBQkpW58OytiP1Y=
23+ - secure : >-
24+ pa7ocLVb5BJPCIC1cnGWWC0nGOKywR6Ac/QuiX1VD1SUt0XxpPVrbBzdgfHIMD0MCJ8F8xIlu2IPgp0O/a6c+Nj2V825Up5yKD/H0k1FKQ/4jp9aInV1VDFkKmoWdQcpCSaHq9HXJH58Bm4lpNyJdCydMpGOjZmSfs/ZGbzNN1Y=
25+ - secure : >-
26+ Og1/VRKnYHFNIj5rFhn/MIWvk8TBJ4CrNwffeBsUmusPJzyeATjkD8ZjGHD3jcjUcI3m4ihHe5al+WOt8GT9pUABDbuvFJXCBtNMGlo0URRlFu+oc3Qi3Ux8gJ/2317HDx9RNOJ+AC8EcBym49BDTm93rHc80ZLBVZZDS2pUU6o=
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ const TEST_FILE = './test/index.js';
3838const TEST_SUPPORT_SERVER_FILE = './test/support/server.js' ;
3939
4040gulp . task ( 'test' , [ 'lint' ] , function ( ) {
41- if ( process . env . hasOwnProperty ( 'BROWSER_NAME ' ) ) {
41+ if ( process . env . hasOwnProperty ( 'BROWSERS ' ) ) {
4242 return testZuul ( ) ;
4343 } else {
4444 return testNode ( ) ;
@@ -63,18 +63,7 @@ gulp.task('lint', function () {
6363// runs zuul through shell process
6464function testZuul ( ) {
6565 const ZUUL_CMD = './node_modules/zuul/bin/zuul' ;
66- const args = [
67- '--browser-name' ,
68- process . env . BROWSER_NAME ,
69- '--browser-version' ,
70- process . env . BROWSER_VERSION
71- ] ;
72- if ( process . env . hasOwnProperty ( 'BROWSER_PLATFORM' ) ) {
73- args . push ( '--browser-platform' ) ;
74- args . push ( process . env . BROWSER_PLATFORM ) ;
75- }
76- args . push ( TEST_FILE ) ;
77- const zuulChild = child . spawn ( ZUUL_CMD , args , { stdio : 'inherit' } ) ;
66+ const zuulChild = child . spawn ( ZUUL_CMD , [ TEST_FILE ] , { stdio : 'inherit' } ) ;
7867 zuulChild . on ( 'exit' , function ( code ) { process . exit ( code ) ; } ) ;
7968 return zuulChild ;
8069}
Original file line number Diff line number Diff line change 2626 "object-component" : " 0.0.3" ,
2727 "parseqs" : " 0.0.5" ,
2828 "parseuri" : " 0.0.5" ,
29- "socket.io-parser" : " ~ 3.1.1 " ,
29+ "socket.io-parser" : " 3.1.2 " ,
3030 "to-array" : " 0.1.4"
3131 },
3232 "devDependencies" : {
4949 "istanbul" : " ^0.4.5" ,
5050 "mocha" : " ^3.3.0" ,
5151 "socket.io" : " 2.0.4" ,
52+ "socket.io-browsers" : " ^1.0.0" ,
5253 "strip-loader" : " 0.1.2" ,
5354 "text-blob-builder" : " 0.0.1" ,
5455 "webpack-merge" : " 4.1.2" ,
Original file line number Diff line number Diff line change 11
2- var webpack = require ( 'webpack' ) ;
3-
42module . exports = {
53 name : 'default' ,
64 entry : './lib/index.js' ,
@@ -17,7 +15,7 @@ module.exports = {
1715 loaders : [ {
1816 test : / \. j s $ / ,
1917 exclude : / ( n o d e _ m o d u l e s | b o w e r _ c o m p o n e n t s ) / ,
20- loader : 'babel' , // 'babel -loader' is also a legal name to reference
18+ loader : 'babel-loader' ,
2119 query : { presets : [ 'es2015' ] }
2220 } , {
2321 test : / \j s o n 3 .j s / ,
Original file line number Diff line number Diff line change 11var webpack = require ( 'webpack' ) ;
22var merge = require ( 'webpack-merge' ) ;
3- var baseConfig = require ( './webpack.config.dev.js' )
3+ var baseConfig = require ( './webpack.config.dev.js' ) ;
44
55module . exports = merge ( baseConfig , {
66 output : {
@@ -21,5 +21,5 @@ module.exports = merge(baseConfig, {
2121 beautify : false
2222 }
2323 } )
24- ] ,
24+ ]
2525} ) ;
Original file line number Diff line number Diff line change @@ -15,13 +15,13 @@ module.exports = {
1515 } ,
1616 devtool : 'source-map' ,
1717 plugins : [
18- new webpack . NormalModuleReplacementPlugin ( / d e b u g / , process . cwd ( ) + '/support/noop.js' ) ,
18+ new webpack . NormalModuleReplacementPlugin ( / d e b u g / , process . cwd ( ) + '/support/noop.js' )
1919 ] ,
2020 module : {
2121 loaders : [ {
2222 test : / \. j s $ / ,
2323 exclude : / ( n o d e _ m o d u l e s | b o w e r _ c o m p o n e n t s ) / ,
24- loader : 'babel' , // 'babel -loader' is also a legal name to reference
24+ loader : 'babel-loader' ,
2525 query : { presets : [ 'es2015' ] }
2626 } , {
2727 test : / \j s o n 3 .j s / ,
Original file line number Diff line number Diff line change 11var webpack = require ( 'webpack' ) ;
22var merge = require ( 'webpack-merge' ) ;
3- var baseConfig = require ( './webpack.config.slim.dev.js' )
3+ var baseConfig = require ( './webpack.config.slim.dev.js' ) ;
44
55module . exports = merge ( baseConfig , {
66 output : {
@@ -10,5 +10,5 @@ module.exports = merge(baseConfig, {
1010 } ,
1111 plugins : [
1212 new webpack . optimize . UglifyJsPlugin ( )
13- ] ,
13+ ]
1414} ) ;
Original file line number Diff line number Diff line change 22require ( './support/env' ) ;
33
44// whitelist some globals to avoid warnings
5- global . ___eio = null ;
5+ if ( global . mocha ) {
6+ global . mocha . globals ( [ '___eio' , 'eio_iframe_*' ] ) ;
7+ }
68
79require ( './url' ) ;
810
Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+ var browsers = require ( 'socket.io-browsers' ) ;
14
25var zuulConfig = module . exports = {
36 ui : 'mocha-bdd' ,
7+
8+ // test on localhost by default
9+ local : true ,
10+
11+ concurrency : 2 , // ngrok only accepts two tunnels by default
12+ // if browser does not sends output in 120s since last output:
13+ // stop testing, something is wrong
14+ browser_output_timeout : 120 * 1000 ,
15+ browser_open_timeout : 60 * 4 * 1000 ,
16+ // we want to be notified something is wrong asap, so no retry
17+ browser_retries : 1 ,
18+
419 server : './test/support/server.js' ,
5- local : true , // test on localhost by default
620 builder : 'zuul-builder-webpack' ,
7- webpack : require ( './support/webpack.config.js' )
21+ webpack : require ( './support/webpack.config.dev. js' )
822} ;
923
1024if ( process . env . CI === 'true' ) {
1125 zuulConfig . local = false ;
1226 zuulConfig . tunnel = {
1327 type : 'ngrok' ,
14- authtoken : '6Aw8vTgcG5EvXdQywVvbh_3fMxvd4Q7dcL2caAHAFjV' ,
15- proto : 'tcp'
28+ bind_tls : true
1629 } ;
1730}
31+
32+ var isPullRequest = process . env . TRAVIS_PULL_REQUEST && process . env . TRAVIS_PULL_REQUEST !== 'false' ;
33+ zuulConfig . browsers = isPullRequest ? browsers . pullRequest : browsers . all ;
You can’t perform that action at this time.
0 commit comments