8000 fix(test): allow dash/underscore separated names · jensWorkGit/angular-cli@1f21582 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1f21582

Browse files
committed
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.
1 parent 4afd815 commit 1f21582

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

addon/ng2/blueprints/ng2/files/karma-test-shim.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ System.import('angular2/src/core/dom/browser_adapter').then(function(browser_ada
3737
});
3838

3939
function onlyAppFiles(filePath) {
40-
return /^\/base\/dist\/app\/(?!spec)([a-z0-9]+)\.js$/.test(filePath);
40+
return /^\/base\/dist\/app\/(?!spec)([a-z0-9-_]+)\.js$/.test(filePath);
4141
}
4242

4343
function onlySpecFiles(path) {
4444
return /\.spec\.js$/.test(path);
45-
}
45+
}

0 commit comments

Comments
 (0)
0