Skip to content

Commit 6744fbe

Browse files
committed
Set up environment variables for testing configuration
- Added default values for REACT_APP_API_BASE_URL and REACT_APP_ENV in setupTests.ts to ensure consistent test environment.
1 parent 7c740b1 commit 6744fbe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/setupTests.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@
33
// expect(element).toHaveTextContent(/react/i)
44
// learn more: https://github.com/testing-library/jest-dom
55
import '@testing-library/jest-dom';
6-
import './__mocks__/resizeObserverMock';
6+
import './__mocks__/resizeObserverMock';
7+
8+
// Set up environment variables for tests
9+
process.env.REACT_APP_API_BASE_URL = process.env.REACT_APP_API_BASE_URL || 'http://localhost:9811';
10+
process.env.REACT_APP_ENV = process.env.REACT_APP_ENV || 'local';

0 commit comments

Comments
 (0)