diff --git a/lib/services/test-execution-service.ts b/lib/services/test-execution-service.ts index f62daba04f..d16da4b885 100644 --- a/lib/services/test-execution-service.ts +++ b/lib/services/test-execution-service.ts @@ -6,6 +6,7 @@ import { RunController } from "../controllers/run-controller"; interface IKarmaConfigOptions { debugBrk: boolean; debugTransport: boolean; + appPath: string; } export class TestExecutionService implements ITestExecutionService { @@ -156,6 +157,7 @@ export class TestExecutionService implements ITestExecutionService { karmaConfig.projectDir = projectData.projectDir; karmaConfig.bundle = true; karmaConfig.debugBrk = this.$options.debugBrk; + karmaConfig.appPath = projectData.getAppDirectoryRelativePath(); karmaConfig.platform = platform.toLowerCase(); this.$logger.debug(JSON.stringify(karmaConfig, null, 4)); diff --git a/resources/test/karma.conf.js b/resources/test/karma.conf.js index e646ebb976..3b96bbbc9f 100644 --- a/resources/test/karma.conf.js +++ b/resources/test/karma.conf.js @@ -99,6 +99,7 @@ function setWebpack(config, options) { const env = {}; env[config.platform] = true; env.sourceMap = config.debugBrk; + env.appPath = config.appPath; options.webpack = require('./webpack.config')(env); delete options.webpack.entry; delete options.webpack.output.libraryTarget;