Skip to content

Commit

Permalink
Merge pull request #20 from wheresrhys/bugfixes
Browse files Browse the repository at this point in the history
Bugfixes
  • Loading branch information
wheresrhys committed Sep 25, 2015
2 parents ce0d254 + ffad7c6 commit 4d5d968
Show file tree
Hide file tree
Showing 10 changed files with 319 additions and 354 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sudo: false
language: node_js
script: npm test
node_js:
- '0.12'
- '4'
before_install:
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
Expand All @@ -19,4 +19,4 @@ deploy:
on:
all_branches: true
tags: true
repo: wheresrhys/fetch-mock
repo: wheresrhys/fetch-mock
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@
test:
mocha test/server.js
./node_modules/karma/bin/karma start --single-run

coverage:
# mocha test/server.js -R mocha-lcov-reporter | ./node_modules/coveralls/bin/coveralls.js
229 changes: 115 additions & 114 deletions README.md

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions client.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
'use strict';

var FetchMock = require('./src/fetch-mock');
const FetchMock = require('./src/fetch-mock');

module.exports = new FetchMock({
theGlobal: window,
Response: window.Response,
Headers: window.Headers,
Blob: window.Blob
Blob: window.Blob,
debug: function () {}
});
6 changes: 3 additions & 3 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ module.exports = function(karma) {
'test/client.js': ['browserify']
},
browserify: {
transform: ['debowerify'],
transform: ['babelify', 'debowerify'],
debug: true
},
browsers: ['PhantomJS', 'Chrome'],
browsers: ['Chrome'],
customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
Expand All @@ -25,7 +25,7 @@ module.exports = function(karma) {
};

if(process.env.TRAVIS){
configuration.browsers = ['PhantomJS', 'Chrome_travis_ci'];
configuration.browsers = ['Chrome_travis_ci'];
}

karma.set(configuration);
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Mock http requests made using fetch (or isomorphic-fetch)",
"main": "server.js",
"scripts": {
"test": "make test coverage"
"test": "make test"
},
"repository": {
"type": "git",
Expand All @@ -25,10 +25,10 @@
"homepage": "https://github.com/wheresrhys/fetch-mock",
"dependencies": {
"node-fetch": "^1.2.0",
"sinon": "^1.14.1",
"debug": "^2.2.0"
},
"devDependencies": {
"babelify": "^6.3.0",
"browserify": "^10.0.0",
"chai": "^2.3.0",
"coveralls": "^2.11.2",
Expand All @@ -39,9 +39,9 @@
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^0.1.8",
"karma-mocha": "^0.1.10",
"karma-phantomjs-launcher": "^0.1.4",
"mocha": "^2.2.4",
"mocha-lcov-reporter": "0.0.2",
"npm-prepublish": "^1.2.0"
"npm-prepublish": "^1.2.0",
"sinon": "^1.17.0"
}
}
11 changes: 6 additions & 5 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
'use strict';

var Response = require('node-fetch').Response;
var Headers = require('node-fetch').Headers;
var stream = require('stream');
var FetchMock = require('./src/fetch-mock');
const Response = require('node-fetch').Response;
const Headers = require('node-fetch').Headers;
const stream = require('stream');
const FetchMock = require('./src/fetch-mock');

module.exports = new FetchMock({
theGlobal: GLOBAL,
Response: Response,
Headers: Headers,
stream: stream
stream: stream,
debug: require('debug')('fetch-mock')
});
Loading

0 comments on commit 4d5d968

Please sign in to comment.