Skip to content

Commit c832736

Browse files
committed
fix test
1 parent 0ad638f commit c832736

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

client/utils/getConfig.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ import { getConfig } from './getConfig';
22

33
const consoleWarnSpy = jest.spyOn(console, 'warn').mockImplementation(() => {});
44

5+
jest.mock('./checkTestEnv', () => ({
6+
isTestEnvironment: false
7+
}));
8+
59
describe('utils/getConfig()', () => {
610
beforeEach(() => {
711
delete global.process.env.CONFIG_TEST_KEY_NAME;
@@ -46,9 +50,6 @@ describe('utils/getConfig()', () => {
4650
throwErrorIfNotFound: true
4751
})
4852
).toThrow();
49-
expect(consoleWarnSpy).toHaveBeenCalledWith(
50-
'getConfig("CONFIG_TEST_KEY_NAME") returned null or undefined'
51-
);
5253
});
5354

5455
it('returns undefined by default', () => {

0 commit comments

Comments
 (0)