From cdc5dc8bc6eed30934fce29202b8aef5a168d45c Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Wed, 16 Sep 2020 07:13:45 -0700 Subject: [PATCH] add tests --- test/integration/Provider.test.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/integration/Provider.test.ts diff --git a/test/integration/Provider.test.ts b/test/integration/Provider.test.ts new file mode 100644 index 00000000..e3ddcb24 --- /dev/null +++ b/test/integration/Provider.test.ts @@ -0,0 +1,18 @@ +import { Ocean } from '../../src/ocean/Ocean' +import config from './config' +import { assert } from 'console' + +describe('Provider tests', () => { + let ocean + it('Initialize Ocean', async () => { + ocean = await Ocean.getInstance(config) + }) + it('Alice tests invalid provider', async () => { + const valid = ocean.provider.isValidProvider('http://example.net') + assert(valid === false) + }) + it('Alice tests valid provider', async () => { + const valid = ocean.provider.isValidProvider('http://127.0.0.1:8030') + assert(valid === true) + }) +})