From 40930801d99207b2ba1af02d37dda7e9bacf0651 Mon Sep 17 00:00:00 2001 From: Rhys Evans Date: Tue, 16 Oct 2018 21:10:47 +0100 Subject: [PATCH] lint --- src/lib/compile-route.js | 1 - src/lib/set-up-and-tear-down.js | 3 ++- test/specs/routing.test.js | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lib/compile-route.js b/src/lib/compile-route.js index 9c5c1c89..f05ec010 100644 --- a/src/lib/compile-route.js +++ b/src/lib/compile-route.js @@ -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 { diff --git a/src/lib/set-up-and-tear-down.js b/src/lib/set-up-and-tear-down.js index a7aa3252..ee50baf8 100644 --- a/src/lib/set-up-and-tear-down.js +++ b/src/lib/set-up-and-tear-down.js @@ -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); diff --git a/test/specs/routing.test.js b/test/specs/routing.test.js index 9205537e..652fa02d 100644 --- a/test/specs/routing.test.js +++ b/test/specs/routing.test.js @@ -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);