Skip to content

Commit a60cf15

Browse files
Merge pull request #3704 from NativeScript/vladimirov/fix-unit-tests-no-mocha
fix(unit-testing): Fix tests executed with jasmine
2 parents a2d491e + d17fd94 commit a60cf15

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/commands/test-init.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,11 @@ class TestInitCommand implements ICommand {
101101

102102
this.$fs.ensureDirectoryExists(testsDir);
103103

104+
const frameworks = [frameworkToInstall].concat(this.karmaConfigAdditionalFrameworks[frameworkToInstall] || [])
105+
.map(fw => `'${fw}'`)
106+
.join(', ');
104107
const karmaConfTemplate = this.$resources.readText('test/karma.conf.js');
105-
const karmaConf = _.template(karmaConfTemplate)({
106-
frameworks: [frameworkToInstall].concat(this.karmaConfigAdditionalFrameworks[frameworkToInstall])
107-
.map(fw => `'${fw}'`)
108-
.join(', ')
109-
});
108+
const karmaConf = _.template(karmaConfTemplate)({ frameworks });
110109

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

0 commit comments

Comments
 (0)