Skip to content

Commit

Permalink
Merge 7e38b3b into 4f6f789
Browse files Browse the repository at this point in the history
  • Loading branch information
thefill committed Jun 23, 2018
2 parents 4f6f789 + 7e38b3b commit e0b7542
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Expand Up @@ -13,6 +13,7 @@ mock.get = defineRoute.bind(null, 'GET');
mock.post = defineRoute.bind(null, 'POST');
mock.put = defineRoute.bind(null, 'PUT');
mock.del = defineRoute.bind(null, 'DELETE');
mock.delete = defineRoute.bind(null, 'DELETE');
mock.patch = defineRoute.bind(null, 'PATCH');

/**
Expand Down Expand Up @@ -47,6 +48,7 @@ var methodsMapping = {
post: 'POST',
put: 'PUT',
del: 'DELETE',
delete: 'DELETE',
patch: 'PATCH'
};

Expand Down Expand Up @@ -173,7 +175,7 @@ function mock(superagent) {
}

mock.unmock = function(superagent) {
['get', 'post', 'put', 'patch', 'del'].forEach(function(method) {
['get', 'post', 'put', 'patch', 'del', 'delete'].forEach(function(method) {
superagent[method] = originalMethods[method];
});

Expand Down

0 comments on commit e0b7542

Please sign in to comment.