@@ -18,10 +18,8 @@ import { encodeProviderIdentityId } from '@matrixai/polykey/dist/identities/util
18
18
import TestProvider from '../TestProvider' ;
19
19
import * as testUtils from '../utils' ;
20
20
21
- // Fixes problem with spyOn overriding imports directly
22
- const mocks = {
23
- browser : identitiesUtils . browser ,
24
- } ;
21
+ // @ts -ignore: stub out method
22
+ identitiesUtils . browser = ( ) => { } ;
25
23
26
24
describe ( 'trust/untrust/list' , ( ) => {
27
25
const logger = new Logger ( 'trust/untrust/list test' , LogLevel . WARN , [
@@ -130,9 +128,6 @@ describe('trust/untrust/list', () => {
130
128
cwd : dataDir ,
131
129
} ,
132
130
) ;
133
- const mockedBrowser = jest
134
- . spyOn ( mocks , 'browser' )
135
- . mockImplementation ( ( ) => { } ) ;
136
131
await testUtils . pkStdio (
137
132
[
138
133
'identities' ,
@@ -148,7 +143,6 @@ describe('trust/untrust/list', () => {
148
143
cwd : dataDir ,
149
144
} ,
150
145
) ;
151
- mockedBrowser . mockRestore ( ) ;
152
146
// Trust node - this should trigger discovery on the gestalt the node
153
147
// belongs to and add it to our gestalt graph
154
148
( { exitCode } = await testUtils . pkStdio (
@@ -264,9 +258,6 @@ describe('trust/untrust/list', () => {
264
258
cwd : dataDir ,
265
259
} ,
266
260
) ;
267
- const mockedBrowser = jest
268
- . spyOn ( mocks , 'browser' )
269
- . mockImplementation ( ( ) => { } ) ;
270
261
await testUtils . pkStdio (
271
262
[
272
263
'identities' ,
@@ -282,7 +273,6 @@ describe('trust/untrust/list', () => {
282
273
cwd : dataDir ,
283
274
} ,
284
275
) ;
285
- mockedBrowser . mockRestore ( ) ;
286
276
// Trust identity - this should trigger discovery on the gestalt the node
287
277
// belongs to and add it to our gestalt graph
288
278
// This command should fail first time as we need to allow time for the
0 commit comments