@gameroom/kit
Version:
Node kit for the Gameroom API
26 lines (22 loc) • 662 B
JavaScript
const { faker } = require('@faker-js/faker'),
chai = require('chai')
const {
lib: { Dictionary }
} = require('../../')
const should = chai.should()
describe('Dictionary', () => {
describe('new Dictionary()', () => {
it('should create a new Dictionary with default values', () => {
const dictionary = new Dictionary()
should.exist(dictionary)
})
})
describe('new Dictionary({})', () => {
it('should create a new Dictionary with provided values', () => {
const key = faker.random.word()
const dictionary = new Dictionary({ key })
should.exist(dictionary)
dictionary.key.should.equal(key)
})
})
})