Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/commands/test-init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ class TestInitCommand implements ICommand {
const frameworks = [frameworkToInstall].concat(this.karmaConfigAdditionalFrameworks[frameworkToInstall] || [])
.map(fw => `'${fw}'`)
.join(', ');
const testFiles = `'${relativeTestsDir}/**/*.js'`;
const karmaConfTemplate = this.$resources.readText('test/karma.conf.js');
const karmaConf = _.template(karmaConfTemplate)({ frameworks });
const karmaConf = _.template(karmaConfTemplate)({ frameworks, testFiles });

this.$fs.writeFile(path.join(projectDir, 'karma.conf.js'), karmaConf);

Expand Down
2 changes: 1 addition & 1 deletion resources/test/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = function(config) {

// list of files / patterns to load in the browser
files: [
'app/**/*.js',
${ testFiles }
],


Expand Down