Change test order, avoids undiagnosed race cond
This commit is contained in:
parent
39f6ca8664
commit
c992671356
1 changed files with 24 additions and 22 deletions
|
|
@ -228,6 +228,30 @@ describe('gun smith', () => {
|
|||
})
|
||||
})
|
||||
|
||||
it('provides an special once() that restarts gun until a value is fetched', async done => {
|
||||
expect.assertions(1)
|
||||
jest.setTimeout(100000)
|
||||
await whenReady()
|
||||
|
||||
const a = words()
|
||||
const b = words()
|
||||
const node = instance.get(a).get(b)
|
||||
const value = words()
|
||||
|
||||
node.specialOnce(data => {
|
||||
expect(data).toEqual(value)
|
||||
|
||||
done()
|
||||
release()
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
node.put(value)
|
||||
}, 30000)
|
||||
})
|
||||
|
||||
// TODO: find out why this test fucks up the previous one if it runs before
|
||||
// that one
|
||||
it('maps over a primitive set', async done => {
|
||||
expect.assertions(100)
|
||||
await whenReady()
|
||||
|
|
@ -430,26 +454,4 @@ describe('gun smith', () => {
|
|||
done()
|
||||
release()
|
||||
})
|
||||
|
||||
it('provides an special once() that restarts gun until a value is fetched', async done => {
|
||||
expect.assertions(1)
|
||||
jest.setTimeout(100000)
|
||||
await whenReady()
|
||||
|
||||
const a = words()
|
||||
const b = words()
|
||||
const node = instance.get(a).get(b)
|
||||
const value = words()
|
||||
|
||||
node.specialOnce(data => {
|
||||
expect(data).toEqual(value)
|
||||
|
||||
done()
|
||||
release()
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
node.put(value)
|
||||
}, 30000)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue