diff --git a/frontend/models/Collection.test.js b/frontend/models/Collection.test.js index ca786824..22d0cdf4 100644 --- a/frontend/models/Collection.test.js +++ b/frontend/models/Collection.test.js @@ -25,6 +25,7 @@ describe('Collection model', () => { }); await collection.fetch(); + expect(client.post).toHaveBeenCalledWith('/collections.info', { id: 123 }); expect(collection.name).toBe('New collection'); }); diff --git a/frontend/utils/setupJest.js b/frontend/utils/setupJest.js index 62af3f25..61b717c2 100644 --- a/frontend/utils/setupJest.js +++ b/frontend/utils/setupJest.js @@ -9,6 +9,5 @@ const snap = children => { expect(toJson(wrapper)).toMatchSnapshot(); }; -global.fetch = require('jest-fetch-mock'); global.localStorage = localStorage; global.snap = snap; diff --git a/package.json b/package.json index cf167742..ba8d2ae7 100644 --- a/package.json +++ b/package.json @@ -180,7 +180,6 @@ "flow-bin": "^0.45.0", "identity-obj-proxy": "^3.0.0", "jest-cli": "^20.0.0", - "jest-fetch-mock": "^1.2.0", "koa-webpack-dev-middleware": "1.4.5", "koa-webpack-hot-middleware": "1.0.3", "lint-staged": "^3.4.0", diff --git a/yarn.lock b/yarn.lock index d7fe0cb8..c88dc85e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4543,12 +4543,6 @@ jest-environment-node@^20.0.3: jest-mock "^20.0.3" jest-util "^20.0.3" -jest-fetch-mock@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/jest-fetch-mock/-/jest-fetch-mock-1.2.0.tgz#15ac5c2d32d2c888bd3d132b682a4deb17f3ab35" - dependencies: - whatwg-fetch "1.0.0" - jest-haste-map@^20.0.3: version "20.0.3" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-20.0.3.tgz#6377d537eaf34eb5f75121a691cae3fde82ba971"