feat: merge JS config variables in initialized config

This commit is contained in:
Jason Wesson
2024-03-28 16:43:59 +00:00
parent 8d6204a4a6
commit ef4b7ecb5d
2 changed files with 6 additions and 21 deletions

View File

@@ -1,10 +1,6 @@
/* eslint-disable import/no-extraneous-dependencies */
import '@testing-library/jest-dom';
import '@testing-library/jest-dom/extend-expect';
// import { mergeConfig } from '@edx/frontend-platform';
// import envConfig from '../env.config';
// mergeConfig(envConfig);
jest.mock('react', () => ({
...jest.requireActual('react'),
@@ -66,23 +62,6 @@ jest.mock('@edx/frontend-platform/i18n', () => {
};
});
/*
When .env.test is removed, uncomment the env vars below and add any environment variables for testing with Jest
Context: Snapshot is not currently set up to be able to parse the environment variables in env.config.js
*/
jest.mock('@edx/frontend-platform', () => ({
getConfig: jest.fn(() => ({
LMS_BASE_URL: 'http://localhost:18000',
LOGOUT_URL: 'http://localhost:18000/logout',
LOGO_URL: 'https://edx-cdn.org/v3/default/logo.svg',
MARKETING_SITE_BASE_URL: 'http://localhost:18000',
SUPPORT_URL: 'http://localhost:18000/support',
OPTIMIZELY_FULL_STACK_SDK_KEY: 'SDK Key',
})),
}));
jest.mock('@openedx/paragon', () => jest.requireActual('testUtils').mockNestedComponents({
Alert: {
Heading: 'Alert.Heading',