From 2836df7b10a326d3ddeb6a61c869d96528ef9c81 Mon Sep 17 00:00:00 2001 From: Martin Maier Date: Thu, 6 Jul 2017 13:52:13 +0200 Subject: [PATCH] Update intro-tutorial.md Unit testing section: the configuration of the providers was missing. Without it the tests will fail. --- articles/intro-tutorial.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/articles/intro-tutorial.md b/articles/intro-tutorial.md index 6c31095..4caebbd 100644 --- a/articles/intro-tutorial.md +++ b/articles/intro-tutorial.md @@ -488,6 +488,7 @@ import 'rxjs/add/operator/toArray'; import { MyComponent } from './my-component'; import { IAppState } from '../store'; +import { CounterActions } from './app.actions'; describe('MyComponent', () => { beforeEach(() => { @@ -495,8 +496,9 @@ describe('MyComponent', () => { // in the test environment to use mock versions of NgRedux and DevToolsExtension. TestBed.configureTestingModule({ declarations: [MyComponent], - imports: [NgReduxTestingModule], - }).compileComponents(); +      imports: [NgReduxTestingModule], + providers: [CounterActions] +    }).compileComponents(); // Reset the mock to start from a clean slate in each unit test. MockNgRedux.reset();