Skip to content

Commit

Permalink
test(schematics): add a test verifying that the ngrx schematics throw…
Browse files Browse the repository at this point in the history
…s when no module given
  • Loading branch information
vsavkin committed Oct 16, 2017
1 parent a5778f8 commit d16db1a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/schematics/src/ngrx/ngrx.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,16 @@ describe('ngrx', () => {
expect(packageJson.dependencies['@ngrx/router-store']).toBeDefined();
expect(packageJson.dependencies['@ngrx/effects']).toBeDefined();
});

it('should error when no module is provided', () => {
expect(() =>
schematicRunner.runSchematic(
'ngrx',
{
name: 'state'
},
appTree
)
).toThrow('Property "/module" is required but missing.');
});
});

0 comments on commit d16db1a

Please sign in to comment.