We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ad638f commit c832736Copy full SHA for c832736
client/utils/getConfig.test.ts
@@ -2,6 +2,10 @@ import { getConfig } from './getConfig';
2
3
const consoleWarnSpy = jest.spyOn(console, 'warn').mockImplementation(() => {});
4
5
+jest.mock('./checkTestEnv', () => ({
6
+ isTestEnvironment: false
7
+}));
8
+
9
describe('utils/getConfig()', () => {
10
beforeEach(() => {
11
delete global.process.env.CONFIG_TEST_KEY_NAME;
@@ -46,9 +50,6 @@ describe('utils/getConfig()', () => {
46
50
throwErrorIfNotFound: true
47
51
})
48
52
).toThrow();
49
- expect(consoleWarnSpy).toHaveBeenCalledWith(
- 'getConfig("CONFIG_TEST_KEY_NAME") returned null or undefined'
- );
53
});
54
55
it('returns undefined by default', () => {
0 commit comments