|
@@ -20,6 +20,7 @@ describe('Connect selectors', () => {
|
|
|
);
|
|
|
expect(selectors.getConnectors(store.getState())).toEqual([]);
|
|
|
expect(selectors.getFailedConnectors(store.getState())).toEqual([]);
|
|
|
+ expect(selectors.getFailedTasks(store.getState())).toEqual(0);
|
|
|
expect(selectors.getIsConnectorFetching(store.getState())).toEqual(false);
|
|
|
expect(selectors.getConnector(store.getState())).toEqual(null);
|
|
|
expect(selectors.getConnectorStatus(store.getState())).toEqual(undefined);
|
|
@@ -74,6 +75,14 @@ describe('Connect selectors', () => {
|
|
|
expect(selectors.getFailedConnectors(store.getState()).length).toEqual(1);
|
|
|
});
|
|
|
|
|
|
+ it('returns failed tasks', () => {
|
|
|
+ store.dispatch({
|
|
|
+ type: fetchConnectors.fulfilled.type,
|
|
|
+ payload: { connectors },
|
|
|
+ });
|
|
|
+ expect(selectors.getFailedTasks(store.getState())).toEqual(1);
|
|
|
+ });
|
|
|
+
|
|
|
it('returns connector', () => {
|
|
|
store.dispatch({
|
|
|
type: fetchConnector.fulfilled.type,
|