Пример #1
0
 it('should contains options', function () {
   storage['player.P1.mode'] = 'KB'
   Actions.reload()
   expect(Store.get().options['player.P1.mode']).to.equal('KB')
   storage['player.P1.mode'] = 'BM'
   Actions.reload()
   expect(Store.get().options['player.P1.mode']).to.equal('BM')
 })
Пример #2
0
 it('should allow setting options', function () {
   storage['player.P1.mode'] = 'KB'
   Actions.reload()
   expect(Store.get().options['player.P1.mode']).to.equal('KB')
   Actions.setOptions({ 'player.P1.mode': 'BM' })
   expect(storage['player.P1.mode']).to.equal('BM')
   expect(Store.get().options['player.P1.mode']).to.equal('BM')
 })
Пример #3
0
 beforeEach(function () {
   oldStorage = Options.getStorage()
   storage = { }
   Options.setStorage({
     getItem (key) { return storage[key] },
     setItem (key, value) { storage[key] = String(value) }
   })
   Actions.reload()
 })