@@ -18,10 +18,8 @@ import { encodeProviderIdentityId } from '@matrixai/polykey/dist/identities/util
1818import TestProvider from '../TestProvider' ;
1919import * as testUtils from '../utils' ;
2020
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 = ( ) => { } ;
2523
2624describe ( 'trust/untrust/list' , ( ) => {
2725 const logger = new Logger ( 'trust/untrust/list test' , LogLevel . WARN , [
@@ -130,9 +128,6 @@ describe('trust/untrust/list', () => {
130128 cwd : dataDir ,
131129 } ,
132130 ) ;
133- const mockedBrowser = jest
134- . spyOn ( mocks , 'browser' )
135- . mockImplementation ( ( ) => { } ) ;
136131 await testUtils . pkStdio (
137132 [
138133 'identities' ,
@@ -148,7 +143,6 @@ describe('trust/untrust/list', () => {
148143 cwd : dataDir ,
149144 } ,
150145 ) ;
151- mockedBrowser . mockRestore ( ) ;
152146 // Trust node - this should trigger discovery on the gestalt the node
153147 // belongs to and add it to our gestalt graph
154148 ( { exitCode } = await testUtils . pkStdio (
@@ -264,9 +258,6 @@ describe('trust/untrust/list', () => {
264258 cwd : dataDir ,
265259 } ,
266260 ) ;
267- const mockedBrowser = jest
268- . spyOn ( mocks , 'browser' )
269- . mockImplementation ( ( ) => { } ) ;
270261 await testUtils . pkStdio (
271262 [
272263 'identities' ,
@@ -282,7 +273,6 @@ describe('trust/untrust/list', () => {
282273 cwd : dataDir ,
283274 } ,
284275 ) ;
285- mockedBrowser . mockRestore ( ) ;
286276 // Trust identity - this should trigger discovery on the gestalt the node
287277 // belongs to and add it to our gestalt graph
288278 // This command should fail first time as we need to allow time for the
0 commit comments