From 1f2158269dcb090f4a2e135d121708cce1fc6438 Mon Sep 17 00:00:00 2001 From: Ciro Nunes Date: Thu, 26 Nov 2015 15:37:06 -0200 Subject: [PATCH] fix(test): allow dash/underscore separated names issue was found whenever creating projects with names like: 'project-2' or 'project_2' Karma weren't able to find the app files. --- addon/ng2/blueprints/ng2/files/karma-test-shim.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addon/ng2/blueprints/ng2/files/karma-test-shim.js b/addon/ng2/blueprints/ng2/files/karma-test-shim.js index 0402b3394263..126a1dc555e9 100644 --- a/addon/ng2/blueprints/ng2/files/karma-test-shim.js +++ b/addon/ng2/blueprints/ng2/files/karma-test-shim.js @@ -37,9 +37,9 @@ System.import('angular2/src/core/dom/browser_adapter').then(function(browser_ada }); function onlyAppFiles(filePath) { - return /^\/base\/dist\/app\/(?!spec)([a-z0-9]+)\.js$/.test(filePath); + return /^\/base\/dist\/app\/(?!spec)([a-z0-9-_]+)\.js$/.test(filePath); } function onlySpecFiles(path) { return /\.spec\.js$/.test(path); -} \ No newline at end of file +}