File tree Expand file tree Collapse file tree 10 files changed +319
-354
lines changed Expand file tree Collapse file tree 10 files changed +319
-354
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ sudo: false
2
2
language : node_js
3
3
script : npm test
4
4
node_js :
5
- - ' 0.12 '
5
+ - ' 4 '
6
6
before_install :
7
7
- export CHROME_BIN=chromium-browser
8
8
- export DISPLAY=:99.0
@@ -19,4 +19,4 @@ deploy:
19
19
on :
20
20
all_branches : true
21
21
tags : true
22
- repo : wheresrhys/fetch-mock
22
+ repo : wheresrhys/fetch-mock
Original file line number Diff line number Diff line change 3
3
test :
4
4
mocha test/server.js
5
5
./node_modules/karma/bin/karma start --single-run
6
-
7
- coverage :
8
- # mocha test/server.js -R mocha-lcov-reporter | ./node_modules/coveralls/bin/coveralls.js
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- var FetchMock = require ( './src/fetch-mock' ) ;
3
+ const FetchMock = require ( './src/fetch-mock' ) ;
4
4
5
5
module . exports = new FetchMock ( {
6
6
theGlobal : window ,
7
7
Response : window . Response ,
8
8
Headers : window . Headers ,
9
- Blob : window . Blob
9
+ Blob : window . Blob ,
10
+ debug : function ( ) { }
10
11
} ) ;
Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ module.exports = function(karma) {
12
12
'test/client.js' : [ 'browserify' ]
13
13
} ,
14
14
browserify : {
15
- transform : [ 'debowerify' ] ,
15
+ transform : [ 'babelify' , ' debowerify'] ,
16
16
debug : true
17
17
} ,
18
- browsers : [ 'PhantomJS' , ' Chrome'] ,
18
+ browsers : [ 'Chrome' ] ,
19
19
customLaunchers : {
20
20
Chrome_travis_ci : {
21
21
base : 'Chrome' ,
@@ -25,7 +25,7 @@ module.exports = function(karma) {
25
25
} ;
26
26
27
27
if ( process . env . TRAVIS ) {
28
- configuration . browsers = [ 'PhantomJS' , ' Chrome_travis_ci'] ;
28
+ configuration . browsers = [ 'Chrome_travis_ci' ] ;
29
29
}
30
30
31
31
karma . set ( configuration ) ;
Original file line number Diff line number Diff line change 4
4
"description" : " Mock http requests made using fetch (or isomorphic-fetch)" ,
5
5
"main" : " server.js" ,
6
6
"scripts" : {
7
- "test" : " make test coverage "
7
+ "test" : " make test"
8
8
},
9
9
"repository" : {
10
10
"type" : " git" ,
25
25
"homepage" : " https://github.com/wheresrhys/fetch-mock" ,
26
26
"dependencies" : {
27
27
"node-fetch" : " ^1.2.0" ,
28
- "sinon" : " ^1.14.1" ,
29
28
"debug" : " ^2.2.0"
30
29
},
31
30
"devDependencies" : {
31
+ "babelify" : " ^6.3.0" ,
32
32
"browserify" : " ^10.0.0" ,
33
33
"chai" : " ^2.3.0" ,
34
34
"coveralls" : " ^2.11.2" ,
39
39
"karma-chai" : " ^0.1.0" ,
40
40
"karma-chrome-launcher" : " ^0.1.8" ,
41
41
"karma-mocha" : " ^0.1.10" ,
42
- "karma-phantomjs-launcher" : " ^0.1.4" ,
43
42
"mocha" : " ^2.2.4" ,
44
43
"mocha-lcov-reporter" : " 0.0.2" ,
45
- "npm-prepublish" : " ^1.2.0"
44
+ "npm-prepublish" : " ^1.2.0" ,
45
+ "sinon" : " ^1.17.0"
46
46
}
47
47
}
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- var Response = require ( 'node-fetch' ) . Response ;
4
- var Headers = require ( 'node-fetch' ) . Headers ;
5
- var stream = require ( 'stream' ) ;
6
- var FetchMock = require ( './src/fetch-mock' ) ;
3
+ const Response = require ( 'node-fetch' ) . Response ;
4
+ const Headers = require ( 'node-fetch' ) . Headers ;
5
+ const stream = require ( 'stream' ) ;
6
+ const FetchMock = require ( './src/fetch-mock' ) ;
7
7
8
8
module . exports = new FetchMock ( {
9
9
theGlobal : GLOBAL ,
10
10
Response : Response ,
11
11
Headers : Headers ,
12
- stream : stream
12
+ stream : stream ,
13
+ debug : require ( 'debug' ) ( 'fetch-mock' )
13
14
} ) ;
You can’t perform that action at this time.
0 commit comments