From c8a15a2631a3912a0eca3c96b925fdf81c9a99bb Mon Sep 17 00:00:00 2001 From: Takatsugu Shigeta Date: Fri, 24 Feb 2017 09:20:28 +0900 Subject: [PATCH 1/2] fix(@angular/cli): Fix filtering files on completion --- packages/@angular/cli/commands/completion.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@angular/cli/commands/completion.ts b/packages/@angular/cli/commands/completion.ts index 1147c7e48f6b..b755ab49ee0d 100644 --- a/packages/@angular/cli/commands/completion.ts +++ b/packages/@angular/cli/commands/completion.ts @@ -78,7 +78,7 @@ const CompletionCommand = Command.extend({ commandOptions.all = !commandOptions.bash && !commandOptions.zsh; const commandFiles = fs.readdirSync(__dirname) - .filter(file => file.match(/\.ts$/) && !file.match(/\.run.ts$/)) + .filter(file => file.match(/\.(j|t)s$/) && !file.match(/\.d.ts$/)) .map(file => path.parse(file).name) .filter(file => { return commandsToIgnore.indexOf(file) < 0; From d9fc028258e49fb2682dfd5f3196497d14464591 Mon Sep 17 00:00:00 2001 From: Takatsugu Shigeta Date: Mon, 27 Feb 2017 13:24:04 +0900 Subject: [PATCH 2/2] test(@angular/cli): Add a test for completion --- tests/e2e/tests/commands/completion/completion.ts | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/e2e/tests/commands/completion/completion.ts diff --git a/tests/e2e/tests/commands/completion/completion.ts b/tests/e2e/tests/commands/completion/completion.ts new file mode 100644 index 000000000000..b88821e8c3ab --- /dev/null +++ b/tests/e2e/tests/commands/completion/completion.ts @@ -0,0 +1,9 @@ +import {silentNg} from '../../../utils/process'; + + +export default function() { + return Promise.resolve() + .then(() => silentNg('completion')) + .then(() => process.chdir('/')) + .then(() => silentNg('completion')); +}