Files
remark42/web/app/common/store.test.js
T
2018-06-23 20:30:51 +03:00

14 lines
329 B
JavaScript

import store from './store';
describe('Store', () => {
it('should trigger listener on add comment', () => {
const listener = jest.fn();
store.set('comments', []);
store.onUpdate('comments', listener);
store.addComment({id:`new`});
expect(listener).toBeCalledWith([{"comment": {"id": "new"}}]);
});
});