Commit 44c4299a authored by Robert Knight's avatar Robert Knight

Remove tests for `store.subscribe` and selector methods

This functionality is now covered by tests for the `createStore` helper.
parent b11b3519
...@@ -289,15 +289,6 @@ describe('store', function () { ...@@ -289,15 +289,6 @@ describe('store', function () {
]); ]);
}); });
describe('#subscribe()', function () {
it('notifies subscribers when the UI state changes', function () {
var listener = sinon.stub();
store.subscribe(listener);
store.addAnnotations([annotationFixtures.defaultAnnotation()]);
assert.called(listener);
});
});
describe('#setForceVisible()', function () { describe('#setForceVisible()', function () {
it('sets the visibility of the annotation', function () { it('sets the visibility of the annotation', function () {
store.setForceVisible('id1', true); store.setForceVisible('id1', true);
...@@ -520,29 +511,4 @@ describe('store', function () { ...@@ -520,29 +511,4 @@ describe('store', function () {
assert.equal(store.getState().annotations[0].$orphan, true); assert.equal(store.getState().annotations[0].$orphan, true);
}); });
}); });
describe('selector functions', function () {
// The individual state management modules in reducers/*.js define various
// 'selector' functions for extracting data from the app state. These are
// then re-exported on the store module.
it('re-exports selectors from reducers', function () {
var selectors = [
// Selection
'hasSelectedAnnotations',
'isAnnotationSelected',
// Annotations
'annotationExists',
'findIDsForTags',
'savedAnnotations',
// App Status
'isSidebar',
];
selectors.forEach(function (fnName) {
assert.equal(typeof store[fnName], 'function', fnName + ' was exported');
});
});
});
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment