diff --git a/e2e/schematics/affected.test.ts b/e2e/schematics/affected.test.ts index af796f6409f19..4e261a05bf738 100644 --- a/e2e/schematics/affected.test.ts +++ b/e2e/schematics/affected.test.ts @@ -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); }); diff --git a/packages/schematics/src/command-line/affected.ts b/packages/schematics/src/command-line/affected.ts index 32b31dcb524d2..f01c2771de8e9 100644 --- a/packages/schematics/src/command-line/affected.ts +++ b/packages/schematics/src/command-line/affected.ts @@ -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'); }