@gameroom/kit
Version:
Node kit for the Gameroom API
32 lines (27 loc) • 677 B
JavaScript
const chai = require('chai')
const {
config,
config: { setAPIDomain },
helpers: { getToken }
} = require('../../')
const should = chai.should()
setAPIDomain('https://apistaging.gameroomforpresident.com')
// setAPIDomain('http://localhost:5000')
describe('setup', () => {
describe('getToken()', () => {
it('should get and set token', async () => {
let result, error
try {
result = await getToken({
email: 'example@example.com',
password: 'password'
})
} catch (err) {
error = err
}
should.not.exist(error)
should.exist(result)
config.token.should.equal(result)
})
})
})