@gameroom/kit
Version:
Node kit for the Gameroom API
29 lines (25 loc) • 586 B
JavaScript
const chai = require('chai')
const {
config,
helpers: { getAuth }
} = require('../../')
const should = chai.should()
describe('getAuth()', () => {
it('should get auth user and token', async () => {
let result, error
try {
result = await getAuth({
email: 'example@example.com',
password: 'password',
subdomain: 'example'
})
} catch (err) {
error = err
}
should.not.exist(error)
should.exist(result)
should.exist(result.user)
should.exist(result.token)
config.token.should.equal(result.token)
})
})