本文整理汇总了TypeScript中flux-test-rig.Rig类的典型用法代码示例。如果您正苦于以下问题:TypeScript Rig类的具体用法?TypeScript Rig怎么用?TypeScript Rig使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Rig类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it('returns defined values for uninitialized data', () => {
const spy = rigged.getSpy('initKeywords');
expect(spy).not.toHaveBeenCalled();
const fWords = rigged.get('fWords');
expect(fWords).toBeDefined();
expect(Array.isArray(fWords)).toBeTruthy();
});
示例2: it
it('nullifies the current active keyword', () => {
initEntryDriver(3);
let clickAction = {
actionType: ActionTypes.KEYWORD_CLICK,
payload: 'tree'
}
cb(clickAction);
expect(store.getEntries().length).toEqual(3);
expect(rigged.get('currHandle')).toEqual('tree');
let resetAction = {
actionType: ActionTypes.ENTRIES_RESET
}
cb(resetAction);
expect(store.getEntries().length).toEqual(0);
expect(rigged.get('currHandle')).toBeNull();
});
示例3: beforeEach
beforeEach(() => {
rigged = rig<IWordCloudStore>('../WordCloudStore.js', 'cb');
store = rigged.getStore('WordCloudStore');
cb = rigged.invokeAction
});
示例4: beforeEach
beforeEach(() => {
rigged = rig<IBlogStore>('../BlogStore.js', 'cb');
store = rigged.getStore('BlogStore');
cb = rigged.invokeAction
});