fix(#300): correctly reference registry url from options

This commit is contained in:
Michael Mok
2019-11-25 02:43:19 +08:00
committed by Priscila Oliveira
parent 0d9232a92c
commit ee74474811
4 changed files with 11 additions and 9 deletions

View File

@@ -1 +1 @@
require.requireActual('babel/polyfill');
jest.requireActual('babel/polyfill');

View File

@@ -7,14 +7,13 @@ import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import { GlobalWithFetchMock } from 'jest-fetch-mock';
// @ts-ignore : Only a void function can be called with the 'new' keyword
configure({ adapter: new Adapter() });
// @ts-ignore : Property '__APP_VERSION__' does not exist on type 'Global'.
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_BASENAME_UI_OPTIONS = { base: 'http://localhost' };
// @ts-ignore : Property 'VERDACCIO_API_URL' does not exist on type 'Global'.
global.VERDACCIO_API_URL = 'https://verdaccio.tld';
const customGlobal: GlobalWithFetchMock = global as GlobalWithFetchMock;