Authentication section in tests

This commit is contained in:
Daniel Lugo 2021-09-23 10:59:35 -04:00
parent 06d20f9c16
commit 84ff20995b

View file

@ -429,14 +429,15 @@ describe('gun smith', () => {
// }, 800) // }, 800)
// }) // })
it('provides an user node with create(), auth() and leave()', async done => { describe('authentication', () => {
expect.assertions(6)
await whenReady()
const user = instance.user() const user = instance.user()
const alias = words() const alias = words()
const pass = words() const pass = words()
it('provides an user node with create(), auth() and leave()', async done => {
expect.assertions(6)
await whenReady()
const ack = await new Promise(res => user.create(alias, pass, res)) const ack = await new Promise(res => user.create(alias, pass, res))
expect(ack.err).toBeUndefined() expect(ack.err).toBeUndefined()
@ -456,6 +457,7 @@ describe('gun smith', () => {
done() done()
release() release()
}) })
})
it('provides thenables for values', async done => { it('provides thenables for values', async done => {
expect.assertions(1) expect.assertions(1)