test(web): App

This commit is contained in:
Paul Armstrong
2021-02-13 20:37:22 -08:00
committed by Blake Blackshear
parent c12aec7c8f
commit 3348f04889
14 changed files with 38 additions and 16 deletions

View File

@@ -1 +0,0 @@
export const baseUrl = 'http://base-url.local:5000';

View File

@@ -2,8 +2,6 @@ import { h } from 'preact';
import { ApiProvider, useFetch, useApiHost } from '..';
import { render, screen } from '@testing-library/preact';
jest.mock('../baseUrl');
describe('useApiHost', () => {
test('is set from the baseUrl', async () => {
function Test() {

View File

@@ -1 +1,2 @@
export const baseUrl = import.meta.env.SNOWPACK_PUBLIC_API_HOST || window.baseUrl || '';
import { API_HOST } from '../env';
export const baseUrl = API_HOST || window.baseUrl || '';