Skip to content

Commit

Permalink
fix(nx): fix affected params interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenPandaz authored and vsavkin committed Apr 28, 2019
1 parent 27e0780 commit b288abd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions e2e/schematics/affected.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,10 @@ describe('Affected', () => {
expect(i18n).toContain(`Running extract-i18n for ${myapp}`);

const interpolatedTests = runCommand(
`npm run affected -- --target test --files="libs/${mylib}/src/index.ts" -- --jest-config {project.root}jest.config.js`
`npm run affected -- --target test --files="libs/${mylib}/src/index.ts" -- --jest-config {project.root}/jest.config.js`
);
expect(interpolatedTests).toContain(
`Running test for affected projects succeeded.`
);
expect(interpolatedTests).toContain(`Running test for ${mylib}`);
}, 1000000);
});
2 changes: 1 addition & 1 deletion packages/schematics/src/command-line/affected.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ function transformArgs(
) {
return args.map(arg => {
const regex = /{project\.([^}]+)}/g;
arg.replace(regex, (_, group: string) => {
return arg.replace(regex, (_, group: string) => {
if (group.includes('.')) {
throw new Error('Only top-level properties can be interpolated');
}
Expand Down

0 comments on commit b288abd

Please sign in to comment.