Skip to content

Commit

Permalink
feat: add subscription tests
Browse files Browse the repository at this point in the history
- added SEED_WORDS to .env.sample
- added jest.config.ts file
- bumped version to v1.1.3
- add nevermined config to the tests
- added test utils for metadata
- added resources folder for tests
  • Loading branch information
r-marques committed Mar 20, 2023
1 parent fb88b02 commit 84e9d0e
Show file tree
Hide file tree
Showing 11 changed files with 1,541 additions and 41 deletions.
3 changes: 3 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ NO_GRAPH=true

JWT_SUBSCRIPTION_SECRET_KEY="12345678901234567890123456789012"
NEVERMINED_PROXY_URI=https://proxy.nevermined.one

# for testing porposes
SEED_WORDS="taxi music thumb unique chat sand crew more leg another off lamp"
1 change: 0 additions & 1 deletion integration/access.integration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ describe('Info', () => {
message: 'hi there',
})
expect(response.statusCode).toBe(201)
console.log(JSON.stringify(response.body))
expect(response.body.url).toContain('cid://')
})
})
18 changes: 18 additions & 0 deletions integration/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { makeAccounts, NeverminedOptions } from '@nevermined-io/sdk'

const configBase: NeverminedOptions = {
web3ProviderUri: 'http://contracts.nevermined.localnet',
marketplaceUri: 'http://marketplace.nevermined.localnet',
neverminedNodeUri: 'http://node.nevermined.localnet',
neverminedNodeAddress: '0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0',
marketplaceAuthToken: undefined,
artifactsFolder: './artifacts',
circuitsFolder: './circuits',
gasMultiplier: 1.1,
}

if (process.env.SEED_WORDS) {
configBase.accounts = makeAccounts(process.env.SEED_WORDS)
}

export const config: NeverminedOptions = configBase

0 comments on commit 84e9d0e

Please sign in to comment.