Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
wheresrhys committed Oct 16, 2018
1 parent 0facdc4 commit 4093080
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/lib/compile-route.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const glob = require('glob-to-regexp');
const URL = require('whatwg-url');
const pathToRegexp = require('path-to-regexp');
const querystring = require('querystring');
const {
Expand Down
3 changes: 2 additions & 1 deletion src/lib/set-up-and-tear-down.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ FetchMock.mock = function(matcher, response, options = {}) {
};

const getMatcher = (route, propName) => route2 =>
(!route[propName] && !route2[propName]) || (route[propName] === route2[propName]);
(!route[propName] && !route2[propName]) ||
route[propName] === route2[propName];

FetchMock.addRoute = function(uncompiledRoute) {
const route = this.compileRoute(uncompiledRoute);
Expand Down
5 changes: 4 additions & 1 deletion test/specs/routing.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,10 @@ module.exports = fetchMock => {
expect(() =>
fm
.mock('/it-at-there', 200, { query: { a: 'b', c: 'e' } })
.mock('/it-at-there', 300, { overwriteRoutes: false, query: { a: 'b', c: 'd' } })
.mock('/it-at-there', 300, {
overwriteRoutes: false,
query: { a: 'b', c: 'd' }
})
).not.to.throw();
const res = await fm.fetchHandler('/it-at-there?a=b&c=d');
expect(res.status).to.equal(300);
Expand Down

0 comments on commit 4093080

Please sign in to comment.