Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
wheresrhys committed Dec 28, 2019
1 parent 3294162 commit 125a178
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/lib/set-up-and-tear-down.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ FetchMock.spy = function() {
FetchMock.compileRoute = compileRoute;

const defineShorthand = (methodName, underlyingMethod, shorthandOptions) => {
FetchMock[methodName] = function(...args) {
FetchMock[methodName] = function(matcher, response, options) {
return this[underlyingMethod](
args[0],
args[1],
Object.assign(args[2] || {}, shorthandOptions)
matcher,
response,
Object.assign(options || {}, shorthandOptions)
);
};
};
Expand Down
4 changes: 2 additions & 2 deletions test/specs/set-up-and-tear-down.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ module.exports = fetchMock => {
expect(fm._mock).called;
});

it.skip('expects a matcher', () => {
it('expects a matcher', () => {
expect(() => fm.mock(null, 'ok')).to.throw();
});

it.skip('expects a response', () => {
it('expects a response', () => {
expect(() => fm.mock('http://it.at.there/')).to.throw();
});

Expand Down

0 comments on commit 125a178

Please sign in to comment.