diff --git a/utils/GunSmith/GunSmith.spec.js b/utils/GunSmith/GunSmith.spec.js index 5e8e0c2f..2e8dd37c 100644 --- a/utils/GunSmith/GunSmith.spec.js +++ b/utils/GunSmith/GunSmith.spec.js @@ -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) - }) })