Skip to content

Commit 922d2f1

Browse files
committed
test(identity): fix test setup that was causing isProduction() to return true in tests
Signed-off-by: Mircea Nistor <mirceanis@gmail.com>
1 parent 74a96d1 commit 922d2f1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

app/scripts/controller-init/identity/authentication-controller-init.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Controller as AuthenticationController } from '@metamask/profile-sync-controller/auth';
22
import { Messenger } from '@metamask/base-controller';
3+
import { Env } from '@metamask/profile-sync-controller/sdk';
34
import { buildControllerInitRequestMock } from '../test/utils';
45
import { ControllerInitRequest } from '../types';
56
import {
@@ -51,6 +52,9 @@ describe('AuthenticationControllerInit', () => {
5152
getMetaMetricsId: requestMock.getMetaMetricsId,
5253
agent: 'extension',
5354
},
55+
config: {
56+
env: Env.DEV,
57+
},
5458
});
5559
});
5660
});

test/env.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
process.env.METAMASK_ENVIRONMENT = 'test';
1+
process.env.METAMASK_ENVIRONMENT = 'testing';
22
process.env.SUPPORT_LINK = 'https://support.metamask.io';
33
process.env.SUPPORT_REQUEST_LINK = 'https://support.metamask.io';
44
process.env.IFRAME_EXECUTION_ENVIRONMENT_URL =

0 commit comments

Comments
 (0)