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:
parent
ccf7250af8
commit
414c885163
@ -21,10 +21,10 @@ before_script:
|
|||||||
- ganache-cli --port 18545 > ganache-cli.log &
|
- ganache-cli --port 18545 > ganache-cli.log &
|
||||||
- git clone https://github.com/oceanprotocol/barge
|
- git clone https://github.com/oceanprotocol/barge
|
||||||
- cd barge
|
- cd barge
|
||||||
- export AQUARIUS_VERSION=v1.0.3
|
- export AQUARIUS_VERSION=v1.0.5
|
||||||
- export BRIZO_VERSION=v0.7.2
|
- export BRIZO_VERSION=v0.7.2
|
||||||
- export KEEPER_VERSION=v0.12.7
|
- 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"
|
- export KEEPER_OWNER_ROLE_ADDRESS="0xe2DD09d719Da89e5a3D0F2549c7E24566e947260"
|
||||||
- rm -rf "${HOME}/.ocean/keeper-contracts/artifacts"
|
- rm -rf "${HOME}/.ocean/keeper-contracts/artifacts"
|
||||||
- bash -x start_ocean.sh --no-commons --no-dashboard 2>&1 > start_ocean.log &
|
- bash -x start_ocean.sh --no-commons --no-dashboard 2>&1 > start_ocean.log &
|
||||||
|
@ -15,11 +15,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "aquarius",
|
"name": "aquarius",
|
||||||
"version": "~1.0.3"
|
"version": "~1.0.5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "events-handler",
|
"name": "events-handler",
|
||||||
"version": "~0.3.0"
|
"version": "~0.3.4"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ describe('OceanAuth', () => {
|
|||||||
|
|
||||||
describe('#store()', () => {
|
describe('#store()', () => {
|
||||||
it('should sign and store the token', async () => {
|
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)
|
await oceanAuth.store(account)
|
||||||
|
|
||||||
|
@ -7,15 +7,15 @@ use(spies)
|
|||||||
|
|
||||||
describe('SubscribablePromise', () => {
|
describe('SubscribablePromise', () => {
|
||||||
it('should work', async () => {
|
it('should work', async () => {
|
||||||
const subscribible = new SubscribablePromise(() => {})
|
const subscribable = new SubscribablePromise(() => null)
|
||||||
|
|
||||||
assert.isDefined(subscribible)
|
assert.isDefined(subscribable)
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('#subscribe()', () => {
|
describe('#subscribe()', () => {
|
||||||
it('should return a subscription', async () => {
|
it('should return a subscription', async () => {
|
||||||
const subscribible = new SubscribablePromise(() => {})
|
const subscribable = new SubscribablePromise(() => null)
|
||||||
const subscription = subscribible.subscribe(() => {})
|
const subscription = subscribable.subscribe(() => null)
|
||||||
|
|
||||||
assert.isDefined(subscription)
|
assert.isDefined(subscription)
|
||||||
assert.isDefined(subscription.unsubscribe)
|
assert.isDefined(subscription.unsubscribe)
|
||||||
@ -24,11 +24,11 @@ describe('SubscribablePromise', () => {
|
|||||||
|
|
||||||
it('should listen the next values', done => {
|
it('should listen the next values', done => {
|
||||||
const onNextSpy = spy()
|
const onNextSpy = spy()
|
||||||
const subscribible = new SubscribablePromise(observer => {
|
const subscribable = new SubscribablePromise(observer => {
|
||||||
setTimeout(() => observer.next('test'), 10)
|
setTimeout(() => observer.next('test'), 10)
|
||||||
setTimeout(() => observer.next('test'), 20)
|
setTimeout(() => observer.next('test'), 20)
|
||||||
})
|
})
|
||||||
subscribible.subscribe(onNextSpy)
|
subscribable.subscribe(onNextSpy)
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
expect(onNextSpy).to.has.been.called.with('test')
|
expect(onNextSpy).to.has.been.called.with('test')
|
||||||
@ -42,12 +42,12 @@ describe('SubscribablePromise', () => {
|
|||||||
it('should resolve', done => {
|
it('should resolve', done => {
|
||||||
const onCompleteSpy = spy()
|
const onCompleteSpy = spy()
|
||||||
const onFinallySpy = spy()
|
const onFinallySpy = spy()
|
||||||
const subscribible = new SubscribablePromise(observer => {
|
const subscribable = new SubscribablePromise(observer => {
|
||||||
setTimeout(() => observer.next('test'), 10)
|
setTimeout(() => observer.next('test'), 10)
|
||||||
setTimeout(() => observer.complete('test'), 20)
|
setTimeout(() => observer.complete('test'), 20)
|
||||||
})
|
})
|
||||||
|
|
||||||
subscribible.then(onCompleteSpy).finally(onFinallySpy)
|
subscribable.then(onCompleteSpy).finally(onFinallySpy)
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
expect(onCompleteSpy).to.has.been.called.with('test')
|
expect(onCompleteSpy).to.has.been.called.with('test')
|
||||||
@ -62,12 +62,12 @@ describe('SubscribablePromise', () => {
|
|||||||
it('should catch the error', done => {
|
it('should catch the error', done => {
|
||||||
const onErrorSpy = spy()
|
const onErrorSpy = spy()
|
||||||
const onFinallySpy = spy()
|
const onFinallySpy = spy()
|
||||||
const subscribible = new SubscribablePromise(observer => {
|
const subscribable = new SubscribablePromise(observer => {
|
||||||
setTimeout(() => observer.next('test'), 10)
|
setTimeout(() => observer.next('test'), 10)
|
||||||
setTimeout(() => observer.error('test'), 20)
|
setTimeout(() => observer.error('test'), 20)
|
||||||
})
|
})
|
||||||
|
|
||||||
subscribible.catch(onErrorSpy).finally(onFinallySpy)
|
subscribable.catch(onErrorSpy).finally(onFinallySpy)
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
expect(onErrorSpy).to.has.been.called.with('test')
|
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 () => {
|
it('should be able to subscribe and wait for a promise', async () => {
|
||||||
const onNextSpy = spy()
|
const onNextSpy = spy()
|
||||||
const subscribible = new SubscribablePromise(observer => {
|
const subscribable = new SubscribablePromise(observer => {
|
||||||
setTimeout(() => observer.next('test'), 10)
|
setTimeout(() => observer.next('test'), 10)
|
||||||
setTimeout(() => observer.next('test'), 20)
|
setTimeout(() => observer.next('test'), 20)
|
||||||
setTimeout(() => observer.complete('completed'), 30)
|
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.with('test')
|
||||||
expect(onNextSpy).to.has.been.called.exactly(2)
|
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 () => {
|
it('should use the result of a the promise as executor to complete the observer', async () => {
|
||||||
const onNextSpy = spy()
|
const onNextSpy = spy()
|
||||||
const subscribible = new SubscribablePromise(async observer => {
|
const subscribable = new SubscribablePromise(async observer => {
|
||||||
await new Promise(resolve => setTimeout(resolve, 10))
|
await new Promise(resolve => setTimeout(resolve, 10))
|
||||||
observer.next('test')
|
observer.next('test')
|
||||||
await new Promise(resolve => setTimeout(resolve, 10))
|
await new Promise(resolve => setTimeout(resolve, 10))
|
||||||
@ -105,7 +105,7 @@ describe('SubscribablePromise', () => {
|
|||||||
return 'completed'
|
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.with('test')
|
||||||
expect(onNextSpy).to.has.been.called.exactly(2)
|
expect(onNextSpy).to.has.been.called.exactly(2)
|
||||||
|
Loading…
Reference in New Issue
Block a user