1
0
mirror of https://github.com/SomboChea/ui synced 2026-01-19 17:46:12 +07:00

fix: adds unit tests for api service (#235)

* refactor: adds unit tests for api service

* refactor: fix test dummy url
This commit is contained in:
Ayush Sharma
2019-11-01 07:18:55 +01:00
committed by Juan Picado @jotadeveloper
parent 5cb47ed49e
commit 803da1c532
2 changed files with 117 additions and 1 deletions

View File

@@ -15,6 +15,8 @@ global.__APP_VERSION__ = '1.0.0';
// @ts-ignore : Property '__VERDACCIO_BASENAME_UI_OPTIONS' does not exist on type 'Global'.
global.__VERDACCIO_BASENAME_UI_OPTIONS = {};
global.VERDACCIO_API_URL = 'https://verdaccio.tld';
const customGlobal: GlobalWithFetchMock = global as GlobalWithFetchMock;
customGlobal.fetch = require('jest-fetch-mock');
customGlobal.fetchMock = customGlobal.fetch;