From 558d1e53d6a58dbd30db3d99cb1a83f13ec36fd6 Mon Sep 17 00:00:00 2001 From: Fatme Date: Fri, 29 Mar 2019 11:22:44 +0200 Subject: [PATCH] fix: add support for ts files on test command when `--bundle` is provided Rel to: https://github.com/NativeScript/nativescript-cli/issues/4477 https://github.com/NativeScript/nativescript-cli/issues/1798 --- unit-testing-config-loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unit-testing-config-loader.js b/unit-testing-config-loader.js index 3d257915..bf3db52d 100644 --- a/unit-testing-config-loader.js +++ b/unit-testing-config-loader.js @@ -2,7 +2,7 @@ const { join, relative } = require("path"); module.exports = function ({ appFullPath, projectRoot, angular, rootPagesRegExp }) { // TODO: Consider to use the files property from karma.conf.js - const testFilesRegExp = /tests\/.*\.js/; + const testFilesRegExp = /tests\/.*\.(ts|js)/; const runnerFullPath = join(projectRoot, "node_modules", "nativescript-unit-test-runner"); const runnerRelativePath = relative(appFullPath, runnerFullPath); let source = `