From 59c5b86e7e64e7c11f36a07253e92bbb1db85cab Mon Sep 17 00:00:00 2001 From: fatme Date: Tue, 16 Jul 2019 12:40:36 +0300 Subject: [PATCH] fix: fix legacy workflow with CLI < 5.4.2 and next version of `nativescript-unit-test-runner` As app's files are already moved to app folder, we need to change the entry point of the application when legacy workflow is used. --- lib/after-prepare.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/after-prepare.ts b/lib/after-prepare.ts index 4d0866e..ccdfd4f 100644 --- a/lib/after-prepare.ts +++ b/lib/after-prepare.ts @@ -23,7 +23,7 @@ module.exports = function (hookArgs, $injector, $testExecutionService) { packageJson = JSON.parse(fs.readFileSync(packageJsonPath).toString()); // When test command is used in ns-cli, we should change the entry point of the application - packageJson.main = "./tns_modules/nativescript-unit-test-runner/app.js"; + packageJson.main = "./tns_modules/nativescript-unit-test-runner/app/app.js"; fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson)); } }