Skip to content

Commit

Permalink
ngrx#955 test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm committed Jul 30, 2018
1 parent 9e9c4f5 commit d3de05a
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions modules/store-devtools/spec/extension.spec.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { LiftedActions, ComputedState, LiftedAction } from './../src/reducer';
import { PerformAction, PERFORM_ACTION } from './../src/actions';
import { ActionSanitizer, StateSanitizer } from './../src/config';
import {
ReduxDevtoolsExtensionConnection,
ReduxDevtoolsExtensionConfig,
} from './../src/extension';
import { Action } from '@ngrx/store';

import { LiftedState } from '../';
import { DevtoolsExtension, ReduxDevtoolsExtension } from '../src/extension';
import { createConfig, noMonitor } from '../src/config';
import { createConfig } from '../src/config';
import { unliftState } from '../src/utils';

function createOptions(
Expand Down Expand Up @@ -97,7 +95,8 @@ describe('DevtoolsExtension', () => {
it('should connect with default options', () => {
devtoolsExtension = new DevtoolsExtension(
reduxDevtoolsExtension,
createConfig({})
createConfig({}),
<any>null
);
// Subscription needed or else extension connection will not be established.
devtoolsExtension.actions$.subscribe(() => null);
Expand All @@ -116,7 +115,8 @@ describe('DevtoolsExtension', () => {
// these two should not be added
actionSanitizer: myActionSanitizer,
stateSanitizer: myStateSanitizer,
})
}),
<any>null
);
// Subscription needed or else extension connection will not be established.
devtoolsExtension.actions$.subscribe(() => null);
Expand All @@ -139,7 +139,8 @@ describe('DevtoolsExtension', () => {
createConfig({
name: 'ngrx-store-devtool-todolist',
serialize: customSerializer,
})
}),
<any>null
);
// Subscription needed or else extension connection will not be established.
devtoolsExtension.actions$.subscribe(() => null);
Expand All @@ -152,7 +153,8 @@ describe('DevtoolsExtension', () => {
it('should send notification with default options', () => {
devtoolsExtension = new DevtoolsExtension(
reduxDevtoolsExtension,
createConfig({})
createConfig({}),
<any>null
);
const defaultOptions = createOptions();
const action = {} as LiftedAction;
Expand All @@ -176,7 +178,8 @@ describe('DevtoolsExtension', () => {
// these two should not be added
actionSanitizer: myActionSanitizer,
stateSanitizer: myStateSanitizer,
})
}),
<any>null
);
const options = createOptions(
'ngrx-store-devtool-todolist',
Expand Down Expand Up @@ -215,7 +218,8 @@ describe('DevtoolsExtension', () => {
beforeEach(() => {
devtoolsExtension = new DevtoolsExtension(
reduxDevtoolsExtension,
createConfig({})
createConfig({}),
<any>null
);
// Subscription needed or else extension connection will not be established.
devtoolsExtension.actions$.subscribe(() => null);
Expand Down Expand Up @@ -252,7 +256,8 @@ describe('DevtoolsExtension', () => {
reduxDevtoolsExtension,
createConfig({
actionSanitizer: testActionSanitizer,
})
}),
<any>null
);
// Subscription needed or else extension connection will not be established.
devtoolsExtension.actions$.subscribe(() => null);
Expand Down Expand Up @@ -297,7 +302,8 @@ describe('DevtoolsExtension', () => {
reduxDevtoolsExtension,
createConfig({
stateSanitizer: testStateSanitizer,
})
}),
<any>null
);
// Subscription needed or else extension connection will not be established.
devtoolsExtension.actions$.subscribe(() => null);
Expand Down Expand Up @@ -341,7 +347,8 @@ describe('DevtoolsExtension', () => {
createConfig({
actionSanitizer: testActionSanitizer,
stateSanitizer: testStateSanitizer,
})
}),
<any>null
);
// Subscription needed or else extension connection will not be established.
devtoolsExtension.actions$.subscribe(() => null);
Expand Down Expand Up @@ -372,7 +379,8 @@ describe('DevtoolsExtension', () => {
beforeEach(() => {
devtoolsExtension = new DevtoolsExtension(
reduxDevtoolsExtension,
createConfig({})
createConfig({}),
<any>null
);
// Subscription needed or else extension connection will not be established.
devtoolsExtension.actions$.subscribe(() => null);
Expand Down Expand Up @@ -406,7 +414,8 @@ describe('DevtoolsExtension', () => {
beforeEach(() => {
devtoolsExtension = new DevtoolsExtension(
reduxDevtoolsExtension,
createConfig({})
createConfig({}),
<any>null
);
// Subscription needed or else extension connection will not be established.
devtoolsExtension.actions$.subscribe(() => null);
Expand Down

0 comments on commit d3de05a

Please sign in to comment.