UNPKG

comelon

Version:

nicolive comment viewer on electron

40 lines (29 loc) 880 B
'use strict'; const chai = require('chai'); const {sandbox} = require('sinon'); chai.use(require('sinon-chai')); describe('TalkStore', () => { const TalkActionType = require('../../app/actions/types/TalkActionTypes'); let AppDispatcher, callback = null; let actionTalk = { actionType: TalkActionType.TALK, message: 'execute to talk if SettingStore has taking option' }; before(() => { sandbox.create(); AppDispatcher = sandbox.spy(require('../../app/dispatcher/AppDispatcher'), 'register'); }); beforeEach(() => { delete require.cache[require.resolve('../../app/stores/TalkStore')]; callback = AppDispatcher.lastCall.args[0]; }); after(() => { sandbox.restore(); }); xit('execute to talk if SettingStore has taking option', done => { callback(actionTalk); setTimeout(() => { done(); }, 300); }); });