1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

more ocean mocking

This commit is contained in:
Matthias Kretschmann 2019-05-31 13:53:05 +02:00
parent a5489a2e6c
commit a1eb68b45a
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 20 additions and 2 deletions

View File

@ -12,10 +12,23 @@ const oceanMock = {
}
}
},
assets: {
resolve: jest.fn(),
order: () => {
return {
next: jest.fn()
}
},
consume: jest.fn()
},
keeper: {
conditions: {
accessSecretStoreCondition: {
getGrantedDidByConsumer: jest.fn()
getGrantedDidByConsumer: () => {
return {
find: jest.fn()
}
}
}
}
}

View File

@ -16,7 +16,12 @@ const file = {
contentLength: 100
}
const ddo = ({ id: 'xxx', findServiceByType: jest.fn() } as any) as DDO
const ddo = ({
id: 'xxx',
findServiceByType: () => {
return { serviceDefinitionId: 'xxx' }
}
} as any) as DDO
ReactGA.initialize('foo', { testMode: true })