Skip to content

Commit

Permalink
fix(Schematics): Remove extra braces from constructor for container b…
Browse files Browse the repository at this point in the history
…lueprint
  • Loading branch information
brandonroberts committed Feb 4, 2018
1 parent a140fa9 commit c671a7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions modules/schematics/src/container/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ describe('Container Schematic', () => {
appTree.create('/src/app/reducers', '');
const tree = schematicRunner.runSchematic('container', options, appTree);
const content = getFileContent(tree, '/src/app/foo/foo.component.ts');
console.log(content);
expect(content).toMatch(/import\ {\ Store\ }\ from\ '@ngrx\/store';/);
});

Expand All @@ -61,7 +60,7 @@ describe('Container Schematic', () => {
const tree = schematicRunner.runSchematic('container', options, appTree);
const content = getFileContent(tree, '/src/app/foo/foo.component.ts');
expect(content).toMatch(
/constructor\(private store\: Store\<fromStore\.State\>\) { }/
/constructor\(private store\: Store\<fromStore\.State\>\) { }\n\n/
);
});

Expand Down
2 changes: 1 addition & 1 deletion modules/schematics/src/container/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function addStateToComponent(options: FeatureOptions) {
const constructorUpdate = new ReplaceChange(
componentPath,
pos,
` ${constructorText}`,
` ${constructorText}\n\n`,
`\n\n ${storeConstructor}`
);

Expand Down

0 comments on commit c671a7c

Please sign in to comment.