Authentication section in tests
This commit is contained in:
parent
06d20f9c16
commit
84ff20995b
1 changed files with 21 additions and 19 deletions
|
|
@ -429,14 +429,15 @@ describe('gun smith', () => {
|
|||
// }, 800)
|
||||
// })
|
||||
|
||||
it('provides an user node with create(), auth() and leave()', async done => {
|
||||
expect.assertions(6)
|
||||
await whenReady()
|
||||
|
||||
describe('authentication', () => {
|
||||
const user = instance.user()
|
||||
const alias = 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))
|
||||
expect(ack.err).toBeUndefined()
|
||||
|
||||
|
|
@ -456,6 +457,7 @@ describe('gun smith', () => {
|
|||
done()
|
||||
release()
|
||||
})
|
||||
})
|
||||
|
||||
it('provides thenables for values', async done => {
|
||||
expect.assertions(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue