Skip to content

Commit

Permalink
Update intro-tutorial.md (#436)
Browse files Browse the repository at this point in the history
Unit testing section:

the configuration of the providers was missing. Without it the tests will fail.
  • Loading branch information
maimArt authored and SethDavenport committed Jul 6, 2017
1 parent fb1af34 commit 4454776
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions articles/intro-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -488,15 +488,17 @@ import 'rxjs/add/operator/toArray';

import { MyComponent } from './my-component';
import { IAppState } from '../store';
import { CounterActions } from './app.actions';

describe('MyComponent', () => {
beforeEach(() => {
// Configure your testBed to use NgReduxTestingModule; this test the DI
// 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();
Expand Down

0 comments on commit 4454776

Please sign in to comment.