File tree Expand file tree Collapse file tree 6 files changed +103
-114
lines changed
Expand file tree Collapse file tree 6 files changed +103
-114
lines changed Original file line number Diff line number Diff line change 33 "version" : " 0.4.0" ,
44 "main" : " fetch.js" ,
55 "devDependencies" : {
6- "es6-promise" : " 1.0.0" ,
7- "qunit" : " 1.14.0"
6+ "es6-promise" : " 1.0.0"
87 },
98 "ignore" : [
109 " .*" ,
Original file line number Diff line number Diff line change 55 "private" : true ,
66 "devDependencies" : {
77 "bower" : " 1.3.8" ,
8+ "chai" : " 1.10.0" ,
89 "jshint" : " 2.5.2" ,
9- "node-qunit-phantomjs" : " 0.2.2"
10+ "mocha-phantomjs" : " 3.5.2" ,
11+ "mocha" : " 2.1.0" ,
12+ "phantomjs" : " 1.9.13"
1013 }
1114}
Original file line number Diff line number Diff line change 1818 "browser" : true ,
1919 "worker" : true ,
2020 "globals" : {
21- "MockXHR" : false ,
22- "QUnit" : false ,
2321 "fetch" : false ,
2422 "Headers" : false ,
2523 "Request" : false ,
2624 "Response" : false ,
27- "module" : false ,
2825 "test" : false ,
29- "asyncTest" : false ,
30- "promiseTest" : false ,
31- "testDone" : false ,
32- "expect" : false ,
33- "start" : false ,
34- "stop" : false ,
35- "ok" : false ,
36- "equal" : false ,
37- "notEqual" : false ,
38- "deepEqual" : false ,
39- "notDeepEqual" : false ,
40- "strictEqual" : false ,
41- "notStrictEqual" : false ,
42- "raises" : false
26+ "assert" : false
4327 }
4428}
Original file line number Diff line number Diff line change @@ -11,4 +11,4 @@ node ./test/server.js $port &>/dev/null &
1111server_pid=$!
1212trap " kill $server_pid " INT EXIT
1313
14- node ./node_modules/.bin/node-qunit- phantomjs " http://localhost:$port /test/test.html"
14+ node ./node_modules/.bin/mocha- phantomjs -s localToRemoteUrlAccessEnabled=true -s webSecurityEnabled=false " http://localhost:$port /test/test.html"
Original file line number Diff line number Diff line change 22< html >
33< head >
44 < meta charset ="utf-8 ">
5- < title > Test Suite </ title >
6- < link rel ="stylesheet " href ="../bower_components/qunit/qunit/qunit .css ">
5+ < title > Fetch Tests </ title >
6+ < link rel ="stylesheet " href ="../node_modules/mocha/mocha .css " / >
77</ head >
88< body >
9- < div id ="qunit "> </ div >
10- < div id ="qunit-fixture "> </ div >
9+ < div id ="mocha "> </ div >
10+ < script src ="../node_modules/chai/chai.js "> </ script >
11+ < script src ="../node_modules/mocha/mocha.js "> </ script >
12+ < script >
13+ mocha . setup ( 'tdd' ) ;
14+ self . assert = chai . assert ;
15+ </ script >
16+
1117 < script src ="../bower_components/es6-promise/promise.js "> </ script >
1218 < script src ="../fetch.js "> </ script >
13- < script src ="../bower_components/qunit/qunit/qunit.js "> </ script >
19+
20+ < script src ="test.js "> </ script >
21+
1422 < script >
15- QUnit . promiseTest = function ( testName , expected , callback ) {
16- QUnit . test ( testName , expected , function ( ) {
17- stop ( ) ;
18- Promise . resolve ( ) . then ( callback ) . then ( start , function ( error ) {
19- ok ( false , error ) ;
20- start ( ) ;
21- } ) ;
22- } ) ;
23+ mocha . checkLeaks ( ) ;
24+ //mocha.globals(['jQuery']);
25+
26+ if ( self . mochaPhantomJS ) {
27+ mochaPhantomJS . run ( ) ;
28+ } else {
29+ mocha . run ( ) ;
2330 }
24- window . promiseTest = QUnit . promiseTest ;
2531 </ script >
26- < script > QUnit . config . testTimeout = 1000 </ script >
27- < script src ="./test.js "> </ script >
2832</ body >
2933</ html >
You can’t perform that action at this time.
0 commit comments