From 1c73ca376bdf5525f6a5bb60787da68e8dd49498 Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 10 Jun 2020 02:14:00 +0200 Subject: [PATCH 1/6] chore(msw): Added msw dependency --- plugins/catalog/package.json | 1 + yarn.lock | 59 ++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index 7b8c1ccc70..cfa66012b6 100644 --- a/plugins/catalog/package.json +++ b/plugins/catalog/package.json @@ -48,6 +48,7 @@ "@types/node": "^12.0.0", "@types/testing-library__jest-dom": "^5.0.4", "jest-fetch-mock": "^3.0.3", + "msw": "^0.19.0", "react-test-renderer": "^16.13.1" }, "files": [ diff --git a/yarn.lock b/yarn.lock index 2b7246b230..28caa7942d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2406,6 +2406,11 @@ dependencies: "@types/node" ">= 8" +"@open-draft/until@^1.0.0": + version "1.0.3" + resolved "https://registry.npmjs.org/@open-draft/until/-/until-1.0.3.tgz#db9cc719191a62e7d9200f6e7bab21c5b848adca" + integrity sha512-Aq58f5HiWdyDlFffbbSjAlv596h/cOnt2DO1w3DOC7OJ5EHs0hd/nycJfiu9RJbT6Yk6F1knnRRXNSpxoIVZ9Q== + "@reach/router@^1.2.1": version "1.3.3" resolved "https://registry.npmjs.org/@reach/router/-/router-1.3.3.tgz#58162860dce6c9449d49be86b0561b5ef46d80db" @@ -3476,6 +3481,11 @@ dependencies: "@types/express" "*" +"@types/cookie@^0.3.3": + version "0.3.3" + resolved "https://registry.npmjs.org/@types/cookie/-/cookie-0.3.3.tgz#85bc74ba782fb7aa3a514d11767832b0e3bc6803" + integrity sha512-LKVP3cgXBT9RYj+t+9FDKwS5tdI+rPBXaNSkma7hvqy35lc7mAokC2zsqWJH0LaqIt3B962nuYI77hsJoT1gow== + "@types/cookiejar@*": version "2.1.1" resolved "https://registry.npmjs.org/@types/cookiejar/-/cookiejar-2.1.1.tgz#90b68446364baf9efd8e8349bb36bd3852b75b80" @@ -6642,6 +6652,11 @@ cookie@0.4.0: resolved "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== +cookie@^0.4.1: + version "0.4.1" + resolved "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1" + integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA== + cookiejar@^2.1.0: version "2.1.2" resolved "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c" @@ -9751,6 +9766,11 @@ graphql@15.0.0: resolved "https://registry.npmjs.org/graphql/-/graphql-15.0.0.tgz#042a5eb5e2506a2e2111ce41eb446a8e570b8be9" integrity sha512-ZyVO1xIF9F+4cxfkdhOJINM+51B06Friuv4M66W7HzUOeFd+vNzUn4vtswYINPi6sysjf1M2Ri/rwZALqgwbaQ== +graphql@^15.0.0: + version "15.1.0" + resolved "https://registry.npmjs.org/graphql/-/graphql-15.1.0.tgz#b93e28de805294ec08e1630d901db550cb8960a1" + integrity sha512-0TVyfOlCGhv/DBczQkJmwXOK6fjWkjzY3Pt7wY8i0gcYXq8aogG3weCsg48m72lywKSeOqedEHvVPOvZvSD51Q== + growly@^1.3.0: version "1.3.0" resolved "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" @@ -9915,6 +9935,11 @@ he@^1.2.0: resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== +headers-utils@^1.1.3, headers-utils@^1.1.9: + version "1.2.0" + resolved "https://registry.npmjs.org/headers-utils/-/headers-utils-1.2.0.tgz#5e10d1bc9d2bccf789547afca5b991a3167241e8" + integrity sha512-4/BMXcWrJErw7JpM87gF8MNEXcIMLzepYZjNRv/P9ctgupl2Ywa3u1PgHtNhSRq84bHH9Ndlkdy7bSi+bZ9I9A== + helmet-crossdomain@0.4.0: version "0.4.0" resolved "https://registry.npmjs.org/helmet-crossdomain/-/helmet-crossdomain-0.4.0.tgz#5f1fe5a836d0325f1da0a78eaa5fd8429078894e" @@ -13139,6 +13164,22 @@ ms@^2.0.0, ms@^2.1.1: resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +msw@^0.19.0: + version "0.19.0" + resolved "https://registry.npmjs.org/msw/-/msw-0.19.0.tgz#fd37015787d40db82d243a2853be66c466675e72" + integrity sha512-1TpmJzJ+afBWTRNJYoeW8KwLQbCVlvvhw2u/eRuIYfel+bPqcut5NaSgo+Bi4C0Q/7M5wza00w1GEuOXQu6FCA== + dependencies: + "@open-draft/until" "^1.0.0" + "@types/cookie" "^0.3.3" + chalk "^4.0.0" + cookie "^0.4.1" + graphql "^15.0.0" + headers-utils "^1.1.9" + node-match-path "^0.4.2" + node-request-interceptor "^0.2.4" + statuses "^2.0.0" + yargs "^15.3.1" + multicast-dns-service-types@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" @@ -13346,6 +13387,11 @@ node-libs-browser@^2.2.1: util "^0.11.0" vm-browserify "^1.0.1" +node-match-path@^0.4.2: + version "0.4.2" + resolved "https://registry.npmjs.org/node-match-path/-/node-match-path-0.4.2.tgz#30cc39510fa493bff03c3d0d2fff711c868ec457" + integrity sha512-wfde4FOC5A8RTSUVZ7pTpBV+dJsr2vVxT6374VrNam6wnnhx6EvwAwL/E/r3AW/YU6XkeZggF5xfBlu4a/ULBg== + node-modules-regexp@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" @@ -13386,6 +13432,14 @@ node-releases@^1.1.29, node-releases@^1.1.52: dependencies: semver "^6.3.0" +node-request-interceptor@^0.2.4: + version "0.2.4" + resolved "https://registry.npmjs.org/node-request-interceptor/-/node-request-interceptor-0.2.4.tgz#f03a1b874823d0bea311a14280227707be946298" + integrity sha512-/htjDLmygBczT5qYPaSxfAEtMkc0LGuH6jqAP1o+TKfQh6yQfFyTtac25cpY8+pb4EawHljCLUN7dCeed9SdPA== + dependencies: + debug "^4.1.1" + headers-utils "^1.1.3" + nodemon@^2.0.2: version "2.0.4" resolved "https://registry.npmjs.org/nodemon/-/nodemon-2.0.4.tgz#55b09319eb488d6394aa9818148c0c2d1c04c416" @@ -17248,6 +17302,11 @@ static-extend@^0.1.1: resolved "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= +statuses@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.0.tgz#aa7b107e018eb33e08e8aee2e7337e762dda1028" + integrity sha512-w9jNUUQdpuVoYqXxnyOakhckBbOxRaoYqJscyIBYCS5ixyCnO7nQn7zBZvP9zf5QOPZcz2DLUpE3KsNPbJBOFA== + stealthy-require@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" From fb8e8e1351ca78c1a5432599eaf8448306e45f75 Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 10 Jun 2020 02:56:24 +0200 Subject: [PATCH 2/6] feat(catalog/msw): Implementing msw for a test with the CatalogApi Client --- plugins/catalog/package.json | 4 +- plugins/catalog/src/api/CatalogClient.test.ts | 68 +++++++++++++++++++ plugins/catalog/src/setupTests.ts | 2 +- yarn.lock | 2 +- 4 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 plugins/catalog/src/api/CatalogClient.test.ts diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index cfa66012b6..297bf3ec4b 100644 --- a/plugins/catalog/package.json +++ b/plugins/catalog/package.json @@ -47,9 +47,9 @@ "@types/jest": "^25.2.2", "@types/node": "^12.0.0", "@types/testing-library__jest-dom": "^5.0.4", - "jest-fetch-mock": "^3.0.3", "msw": "^0.19.0", - "react-test-renderer": "^16.13.1" + "react-test-renderer": "^16.13.1", + "whatwg-fetch": "^3.0.0" }, "files": [ "dist/**/*.{js,d.ts}" diff --git a/plugins/catalog/src/api/CatalogClient.test.ts b/plugins/catalog/src/api/CatalogClient.test.ts new file mode 100644 index 0000000000..e7cbc4d1c8 --- /dev/null +++ b/plugins/catalog/src/api/CatalogClient.test.ts @@ -0,0 +1,68 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { rest } from 'msw'; +import { setupServer } from 'msw/node'; +import { CatalogClient } from './CatalogClient'; +import { DescriptorEnvelope } from '../types'; + +const server = setupServer(); + +describe('CatalogClient', () => { + beforeAll(() => server.listen()); + afterEach(() => server.resetHandlers()); + afterAll(() => server.close()); + + describe('getEntities', () => { + it('should return the json response for the correct path', async () => { + const mockApiOrigin = 'http://backstage:9191'; + const mockBasePath = '/i-am-a-mock-base'; + const client = new CatalogClient({ + apiOrigin: mockApiOrigin, + basePath: mockBasePath, + }); + + const mockDescriptors: DescriptorEnvelope[] = [ + { + apiVersion: '1', + kind: 'Component', + metadata: { + description: 'Im a description', + name: 'Test1', + namespace: 'test1', + }, + }, + { + apiVersion: '1', + kind: 'Component', + metadata: { + description: 'Im a description', + name: 'Test2', + namespace: 'test1', + }, + }, + ]; + server.use( + rest.get(`${mockApiOrigin}${mockBasePath}/entities`, (_, res, ctx) => { + return res(ctx.json(mockDescriptors)); + }), + ); + + const entities = await client.getEntities(); + + expect(entities).toEqual(mockDescriptors); + }); + }); +}); diff --git a/plugins/catalog/src/setupTests.ts b/plugins/catalog/src/setupTests.ts index e34bc46f4b..4016f3f38e 100644 --- a/plugins/catalog/src/setupTests.ts +++ b/plugins/catalog/src/setupTests.ts @@ -15,4 +15,4 @@ */ import '@testing-library/jest-dom'; -require('jest-fetch-mock').enableMocks(); +import 'whatwg-fetch'; diff --git a/yarn.lock b/yarn.lock index 28caa7942d..b881a20a41 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19117,7 +19117,7 @@ whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3, whatwg-encoding@^1.0.5: dependencies: iconv-lite "0.4.24" -whatwg-fetch@3.0.0: +whatwg-fetch@3.0.0, whatwg-fetch@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb" integrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q== From 6af18f7e2756fa53fdf51e6a203c2d62a95b4b4a Mon Sep 17 00:00:00 2001 From: blam Date: Thu, 11 Jun 2020 23:23:52 +0200 Subject: [PATCH 3/6] feat(catalog/msw): fixed merge conflicts and fixed some comments --- plugins/catalog/src/api/CatalogClient.test.ts | 67 +++++++++++++++---- 1 file changed, 54 insertions(+), 13 deletions(-) diff --git a/plugins/catalog/src/api/CatalogClient.test.ts b/plugins/catalog/src/api/CatalogClient.test.ts index b8ba76b95e..719513529c 100644 --- a/plugins/catalog/src/api/CatalogClient.test.ts +++ b/plugins/catalog/src/api/CatalogClient.test.ts @@ -17,6 +17,7 @@ import { rest } from 'msw'; import { setupServer } from 'msw/node'; import { CatalogClient } from './CatalogClient'; +import { Entity } from '@backstage/catalog-model'; const server = setupServer(); describe('CatalogClient', () => { @@ -36,21 +37,61 @@ describe('CatalogClient', () => { basePath: mockBasePath, }); }); - it('builds entity search filters properly', async () => { - expect.assertions(2); - server.use( - rest.get(`${mockApiOrigin}${mockBasePath}/entities`, (req, res, ctx) => { - expect(req.url.searchParams.toString()).toBe('a=1&b=2&b=3&%C3%B6=%3D'); - return res(ctx.json([])); - }), - ); - const entities = await client.getEntities({ - a: '1', - b: ['2', '3'], - ö: '=', + describe('getEntiies', () => { + const defaultResponse: Entity[] = [ + { + apiVersion: '1', + kind: 'Component', + metadata: { + name: 'Test1', + namespace: 'test1', + }, + }, + { + apiVersion: '1', + kind: 'Component', + metadata: { + name: 'Test2', + namespace: 'test1', + }, + }, + ]; + + beforeEach(() => { + server.use( + rest.get(`${mockApiOrigin}${mockBasePath}/entities`, (_, res, ctx) => { + return res(ctx.json(defaultResponse)); + }), + ); }); - expect(entities).toEqual([]); + it('should entities from correct endpoint', async () => { + const entities = await client.getEntities(); + expect(entities).toEqual(defaultResponse); + }); + + it('builds entity search filters properly', async () => { + expect.assertions(2); + server.use( + rest.get( + `${mockApiOrigin}${mockBasePath}/entities`, + (req, res, ctx) => { + expect(req.url.searchParams.toString()).toBe( + 'a=1&b=2&b=3&%C3%B6=%3D', + ); + return res(ctx.json([])); + }, + ), + ); + + const entities = await client.getEntities({ + a: '1', + b: ['2', '3'], + ö: '=', + }); + + expect(entities).toEqual([]); + }); }); }); From 70ae94e231658b8a10d9e6cb2d3dcfba6fbedfd3 Mon Sep 17 00:00:00 2001 From: blam Date: Fri, 12 Jun 2020 02:57:26 +0200 Subject: [PATCH 4/6] chore(catalog/msw): remove jest fetch mock --- .../templates/default-plugin/package.json.hbs | 91 +++++++++---------- 1 file changed, 45 insertions(+), 46 deletions(-) diff --git a/packages/cli/templates/default-plugin/package.json.hbs b/packages/cli/templates/default-plugin/package.json.hbs index c92795cc04..06a9f3fd37 100644 --- a/packages/cli/templates/default-plugin/package.json.hbs +++ b/packages/cli/templates/default-plugin/package.json.hbs @@ -1,48 +1,47 @@ { - "name": "@backstage/plugin-{{id}}", - "version": "{{version}}", - "main": "dist/index.esm.js", - "main:src": "src/index.ts", - "types": "src/index.ts", - "license": "Apache-2.0", - "private": true, - "publishConfig": { - "access": "public", - "main": "dist/index.esm.js", - "types": "dist/index.d.ts" - }, - "scripts": { - "build": "backstage-cli plugin:build", - "start": "backstage-cli plugin:serve", - "lint": "backstage-cli lint", - "test": "backstage-cli test", - "diff": "backstage-cli plugin:diff", - "prepack": "backstage-cli prepack", - "postpack": "backstage-cli postpack", - "clean": "backstage-cli clean" - }, - "dependencies": { - "@backstage/core": "^{{version}}", - "@backstage/theme": "^{{version}}", - "@material-ui/core": "^4.9.1", - "@material-ui/icons": "^4.9.1", - "@material-ui/lab": "4.0.0-alpha.45", - "react": "^16.13.1", - "react-dom": "^16.13.1", - "react-use": "^14.2.0" - }, - "devDependencies": { - "@backstage/cli": "^{{version}}", - "@backstage/dev-utils": "^{{version}}", - "@testing-library/jest-dom": "^5.7.0", - "@testing-library/react": "^9.3.2", - "@testing-library/user-event": "^10.2.4", - "@types/jest": "^25.2.2", - "@types/node": "^12.0.0", - "@types/testing-library__jest-dom": "^5.0.4", - "jest-fetch-mock": "^3.0.3" - }, - "files": [ - "dist/**/*.{js,d.ts}" - ] +"name": "@backstage/plugin-{{id}}", +"version": "{{version}}", +"main": "dist/index.esm.js", +"main:src": "src/index.ts", +"types": "src/index.ts", +"license": "Apache-2.0", +"private": true, +"publishConfig": { +"access": "public", +"main": "dist/index.esm.js", +"types": "dist/index.d.ts" +}, +"scripts": { +"build": "backstage-cli plugin:build", +"start": "backstage-cli plugin:serve", +"lint": "backstage-cli lint", +"test": "backstage-cli test", +"diff": "backstage-cli plugin:diff", +"prepack": "backstage-cli prepack", +"postpack": "backstage-cli postpack", +"clean": "backstage-cli clean" +}, +"dependencies": { +"@backstage/core": "^{{version}}", +"@backstage/theme": "^{{version}}", +"@material-ui/core": "^4.9.1", +"@material-ui/icons": "^4.9.1", +"@material-ui/lab": "4.0.0-alpha.45", +"react": "^16.13.1", +"react-dom": "^16.13.1", +"react-use": "^14.2.0" +}, +"devDependencies": { +"@backstage/cli": "^{{version}}", +"@backstage/dev-utils": "^{{version}}", +"@testing-library/jest-dom": "^5.7.0", +"@testing-library/react": "^9.3.2", +"@testing-library/user-event": "^10.2.4", +"@types/jest": "^25.2.2", +"@types/node": "^12.0.0", +"@types/testing-library__jest-dom": "^5.0.4" +}, +"files": [ +"dist/**/*.{js,d.ts}" +] } From d036ceef41381f11fab57a268a4869587bbf8219 Mon Sep 17 00:00:00 2001 From: blam Date: Sat, 13 Jun 2020 02:24:13 +0200 Subject: [PATCH 5/6] chore(catalog/msw): resetting the core plugin package.json for now --- .../templates/default-plugin/package.json.hbs | 91 ++++++++++--------- 1 file changed, 46 insertions(+), 45 deletions(-) diff --git a/packages/cli/templates/default-plugin/package.json.hbs b/packages/cli/templates/default-plugin/package.json.hbs index 06a9f3fd37..c92795cc04 100644 --- a/packages/cli/templates/default-plugin/package.json.hbs +++ b/packages/cli/templates/default-plugin/package.json.hbs @@ -1,47 +1,48 @@ { -"name": "@backstage/plugin-{{id}}", -"version": "{{version}}", -"main": "dist/index.esm.js", -"main:src": "src/index.ts", -"types": "src/index.ts", -"license": "Apache-2.0", -"private": true, -"publishConfig": { -"access": "public", -"main": "dist/index.esm.js", -"types": "dist/index.d.ts" -}, -"scripts": { -"build": "backstage-cli plugin:build", -"start": "backstage-cli plugin:serve", -"lint": "backstage-cli lint", -"test": "backstage-cli test", -"diff": "backstage-cli plugin:diff", -"prepack": "backstage-cli prepack", -"postpack": "backstage-cli postpack", -"clean": "backstage-cli clean" -}, -"dependencies": { -"@backstage/core": "^{{version}}", -"@backstage/theme": "^{{version}}", -"@material-ui/core": "^4.9.1", -"@material-ui/icons": "^4.9.1", -"@material-ui/lab": "4.0.0-alpha.45", -"react": "^16.13.1", -"react-dom": "^16.13.1", -"react-use": "^14.2.0" -}, -"devDependencies": { -"@backstage/cli": "^{{version}}", -"@backstage/dev-utils": "^{{version}}", -"@testing-library/jest-dom": "^5.7.0", -"@testing-library/react": "^9.3.2", -"@testing-library/user-event": "^10.2.4", -"@types/jest": "^25.2.2", -"@types/node": "^12.0.0", -"@types/testing-library__jest-dom": "^5.0.4" -}, -"files": [ -"dist/**/*.{js,d.ts}" -] + "name": "@backstage/plugin-{{id}}", + "version": "{{version}}", + "main": "dist/index.esm.js", + "main:src": "src/index.ts", + "types": "src/index.ts", + "license": "Apache-2.0", + "private": true, + "publishConfig": { + "access": "public", + "main": "dist/index.esm.js", + "types": "dist/index.d.ts" + }, + "scripts": { + "build": "backstage-cli plugin:build", + "start": "backstage-cli plugin:serve", + "lint": "backstage-cli lint", + "test": "backstage-cli test", + "diff": "backstage-cli plugin:diff", + "prepack": "backstage-cli prepack", + "postpack": "backstage-cli postpack", + "clean": "backstage-cli clean" + }, + "dependencies": { + "@backstage/core": "^{{version}}", + "@backstage/theme": "^{{version}}", + "@material-ui/core": "^4.9.1", + "@material-ui/icons": "^4.9.1", + "@material-ui/lab": "4.0.0-alpha.45", + "react": "^16.13.1", + "react-dom": "^16.13.1", + "react-use": "^14.2.0" + }, + "devDependencies": { + "@backstage/cli": "^{{version}}", + "@backstage/dev-utils": "^{{version}}", + "@testing-library/jest-dom": "^5.7.0", + "@testing-library/react": "^9.3.2", + "@testing-library/user-event": "^10.2.4", + "@types/jest": "^25.2.2", + "@types/node": "^12.0.0", + "@types/testing-library__jest-dom": "^5.0.4", + "jest-fetch-mock": "^3.0.3" + }, + "files": [ + "dist/**/*.{js,d.ts}" + ] } From f3245c4f8f0b6b2625c4a6d5d50161b612fb4757 Mon Sep 17 00:00:00 2001 From: blam Date: Mon, 15 Jun 2020 14:57:53 +0200 Subject: [PATCH 6/6] chore(catalog/msw): resetting package.json --- plugins/catalog/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index 91fa4fdbee..eb8672bc42 100644 --- a/plugins/catalog/package.json +++ b/plugins/catalog/package.json @@ -48,6 +48,7 @@ "@types/jest": "^25.2.2", "@types/node": "^12.0.0", "@types/testing-library__jest-dom": "^5.0.4", + "jest-fetch-mock": "^3.0.3", "msw": "^0.19.0", "react-test-renderer": "^16.13.1", "whatwg-fetch": "^3.0.0"