Fix test cases.

Signed-off-by: Aramis Sennyey <sennyeya@amazon.com>
This commit is contained in:
Aramis Sennyey
2022-11-29 11:41:33 -05:00
parent c6fc99450d
commit 43ad38e75d
3 changed files with 9 additions and 2 deletions
+1
View File
@@ -28,6 +28,7 @@ describe('App', () => {
app: {
title: 'Test',
support: { url: 'http://localhost:7007/support' },
baseUrl: 'http://localhost:3000',
},
backend: { baseUrl: 'http://localhost:7007' },
lighthouse: {
@@ -24,7 +24,13 @@ const anyEnv = (process.env = { ...process.env }) as any;
describe('DevAppBuilder', () => {
it('should be able to render a component in a dev app', async () => {
anyEnv.APP_CONFIG = [
{ context: 'test', data: { app: { title: 'Test App' } } },
{
context: 'test',
data: {
app: { title: 'Test App', baseUrl: 'http://localhost:3000' },
backend: { baseUrl: 'http://localhost:7007' },
},
},
];
const MyComponent = () => {
@@ -22,7 +22,7 @@ jest.mock('./config', () => ({
configLoader: async () => [
{
data: {
app: { title: 'Test' },
app: { title: 'Test', baseUrl: 'http://localhost:3000' },
backend: { baseUrl: 'http://localhost:7007' },
techdocs: {
storageUrl: 'http://localhost:7007/api/techdocs/static/docs',