1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

update provider tests

This commit is contained in:
Bogdan Fazakas 2022-01-12 11:46:59 +02:00
parent 456699f34d
commit d91dd5a8a8
2 changed files with 6 additions and 2 deletions

View File

@ -39,6 +39,7 @@
"test:unit": "npm run mocha -- 'test/unit/**/*.test.ts'",
"test:unit:cover": "nyc --report-dir coverage/unit npm run test:unit",
"test:integration": "npm run mocha -- 'test/integration/**/*.test.ts'",
"test:provider": "npm run mocha -- 'test/integration/Provider.test.ts'",
"test:integration:cover": "nyc --report-dir coverage/integration --no-clean npm run test:integration"
},
"repository": {

View File

@ -11,14 +11,17 @@ describe('Provider tests', () => {
})
it('Alice tests invalid provider', async () => {
const valid = await providerInstance.isValidProvider('http://example.net', fetchData)
const valid = await providerInstance.isValidProvider(
'http://example.net',
crossFetchGeneric
)
assert(valid === false)
})
it('Alice tests valid provider', async () => {
const valid = await providerInstance.isValidProvider(
'http://127.0.0.1:8030',
fetchData
crossFetchGeneric
)
assert(valid === true)
})