1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00

lint fixes, bump Ocean components

This commit is contained in:
Matthias Kretschmann 2019-12-06 10:20:55 +01:00
parent ccf7250af8
commit 414c885163
Signed by: m
GPG Key ID: 606EEEF3C479A91F
5 changed files with 20 additions and 19 deletions

1
.nvmrc Normal file
View File

@ -0,0 +1 @@
v12

View File

@ -21,10 +21,10 @@ before_script:
- ganache-cli --port 18545 > ganache-cli.log &
- git clone https://github.com/oceanprotocol/barge
- cd barge
- export AQUARIUS_VERSION=v1.0.3
- export AQUARIUS_VERSION=v1.0.5
- export BRIZO_VERSION=v0.7.2
- export KEEPER_VERSION=v0.12.7
- export EVENTS_HANDLER_VERSION=v0.3.0
- export EVENTS_HANDLER_VERSION=v0.3.4
- export KEEPER_OWNER_ROLE_ADDRESS="0xe2DD09d719Da89e5a3D0F2549c7E24566e947260"
- rm -rf "${HOME}/.ocean/keeper-contracts/artifacts"
- bash -x start_ocean.sh --no-commons --no-dashboard 2>&1 > start_ocean.log &

View File

@ -15,11 +15,11 @@
},
{
"name": "aquarius",
"version": "~1.0.3"
"version": "~1.0.5"
},
{
"name": "events-handler",
"version": "~0.3.0"
"version": "~0.3.4"
}
]
}

View File

@ -54,7 +54,7 @@ describe('OceanAuth', () => {
describe('#store()', () => {
it('should sign and store the token', async () => {
const writeTokenSpy = spy.on(oceanAuth as any, 'writeToken', () => {})
const writeTokenSpy = spy.on(oceanAuth as any, 'writeToken', () => null)
await oceanAuth.store(account)

View File

@ -7,15 +7,15 @@ use(spies)
describe('SubscribablePromise', () => {
it('should work', async () => {
const subscribible = new SubscribablePromise(() => {})
const subscribable = new SubscribablePromise(() => null)
assert.isDefined(subscribible)
assert.isDefined(subscribable)
})
describe('#subscribe()', () => {
it('should return a subscription', async () => {
const subscribible = new SubscribablePromise(() => {})
const subscription = subscribible.subscribe(() => {})
const subscribable = new SubscribablePromise(() => null)
const subscription = subscribable.subscribe(() => null)
assert.isDefined(subscription)
assert.isDefined(subscription.unsubscribe)
@ -24,11 +24,11 @@ describe('SubscribablePromise', () => {
it('should listen the next values', done => {
const onNextSpy = spy()
const subscribible = new SubscribablePromise(observer => {
const subscribable = new SubscribablePromise(observer => {
setTimeout(() => observer.next('test'), 10)
setTimeout(() => observer.next('test'), 20)
})
subscribible.subscribe(onNextSpy)
subscribable.subscribe(onNextSpy)
setTimeout(() => {
expect(onNextSpy).to.has.been.called.with('test')
@ -42,12 +42,12 @@ describe('SubscribablePromise', () => {
it('should resolve', done => {
const onCompleteSpy = spy()
const onFinallySpy = spy()
const subscribible = new SubscribablePromise(observer => {
const subscribable = new SubscribablePromise(observer => {
setTimeout(() => observer.next('test'), 10)
setTimeout(() => observer.complete('test'), 20)
})
subscribible.then(onCompleteSpy).finally(onFinallySpy)
subscribable.then(onCompleteSpy).finally(onFinallySpy)
setTimeout(() => {
expect(onCompleteSpy).to.has.been.called.with('test')
@ -62,12 +62,12 @@ describe('SubscribablePromise', () => {
it('should catch the error', done => {
const onErrorSpy = spy()
const onFinallySpy = spy()
const subscribible = new SubscribablePromise(observer => {
const subscribable = new SubscribablePromise(observer => {
setTimeout(() => observer.next('test'), 10)
setTimeout(() => observer.error('test'), 20)
})
subscribible.catch(onErrorSpy).finally(onFinallySpy)
subscribable.catch(onErrorSpy).finally(onFinallySpy)
setTimeout(() => {
expect(onErrorSpy).to.has.been.called.with('test')
@ -80,13 +80,13 @@ describe('SubscribablePromise', () => {
it('should be able to subscribe and wait for a promise', async () => {
const onNextSpy = spy()
const subscribible = new SubscribablePromise(observer => {
const subscribable = new SubscribablePromise(observer => {
setTimeout(() => observer.next('test'), 10)
setTimeout(() => observer.next('test'), 20)
setTimeout(() => observer.complete('completed'), 30)
})
const result = await subscribible.next(onNextSpy)
const result = await subscribable.next(onNextSpy)
expect(onNextSpy).to.has.been.called.with('test')
expect(onNextSpy).to.has.been.called.exactly(2)
@ -96,7 +96,7 @@ describe('SubscribablePromise', () => {
it('should use the result of a the promise as executor to complete the observer', async () => {
const onNextSpy = spy()
const subscribible = new SubscribablePromise(async observer => {
const subscribable = new SubscribablePromise(async observer => {
await new Promise(resolve => setTimeout(resolve, 10))
observer.next('test')
await new Promise(resolve => setTimeout(resolve, 10))
@ -105,7 +105,7 @@ describe('SubscribablePromise', () => {
return 'completed'
})
const result = await subscribible.next(onNextSpy)
const result = await subscribable.next(onNextSpy)
expect(onNextSpy).to.has.been.called.with('test')
expect(onNextSpy).to.has.been.called.exactly(2)