From e6ffd5831d52c64e81392d8817feb5b879ddccf8 Mon Sep 17 00:00:00 2001 From: Anders Evenrud Date: Sat, 11 Apr 2020 00:40:46 +0200 Subject: [PATCH] Updated unit tests (#106) --- __mocks__/setup.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/__mocks__/setup.js b/__mocks__/setup.js index cf0ec6da..4e8b03d4 100644 --- a/__mocks__/setup.js +++ b/__mocks__/setup.js @@ -28,6 +28,12 @@ class Worker { const noop = () => {}; +const dummyMetadata = [{ + name: 'ValidApplication', + mimes: ['valid/bazz'], + files: [] +}]; + const fetchMocks = { text: { @@ -46,11 +52,8 @@ const fetchMocks = { '/apps/Jest/test': true, - '/metadata.json': [{ - name: 'ValidApplication', - mimes: ['valid/bazz'], - files: [] - }], + '/metadata.json': dummyMetadata, + '/api/packages/metadata': dummyMetadata, '/settings': ({method}) => String(method).toLowerCase() === 'post' ? true