Skip to content

Commit 53b360d

Browse files
FatmeDimitar Tachev
andauthored
chore: apply suggestions from PR review
Co-Authored-By: Dimitar Tachev <dimitar.tachev@telerik.com>
1 parent efdcf9a commit 53b360d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/controllers/migrate-controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@ export class MigrateController extends UpdateControllerBase implements IMigrateC
225225
// Migrate karma.conf.js
226226
const oldKarmaContent = this.$fs.readText(path.join(migrationBackupDirPath, constants.KARMA_CONFIG_NAME));
227227

228-
const regExp = /frameworks:\s+\[(\S+)\]\,/g;
228+
const regExp = /frameworks:\s+\[([\S\s]*?)\]/g;
229229
const matches = regExp.exec(oldKarmaContent);
230-
const frameworks = (matches && matches[1]) || '["jasmine"]';
230+
const frameworks = (matches && matches[1] && matches[1].trim()) || '["jasmine"]';
231231

232232
const testsDir = path.join(projectData.appDirectoryPath, 'tests');
233233
const relativeTestsDir = path.relative(projectData.projectDir, testsDir);

0 commit comments

Comments
 (0)