Merge pull request #7228 from NativeScript/svetoslavtsenov/fix-unit-tests

tests: fix require mainthread-module
This commit is contained in:
Svetoslav
2019-05-10 12:18:58 +03:00
committed by GitHub
2 changed files with 7 additions and 6 deletions

View File

@ -8,12 +8,13 @@ const tnsCoreModules = path.resolve(__dirname, "..", "tns-core-modules");
moduleAlias.addPath(tnsCoreModules);
moduleAlias.addAliases({
// NOTE: require("tns-core-modules/platform") with these aliases will work in node but fail in Angular AoT
// "tns-core-modules/platform": path.resolve(__dirname, "polyfills", "platform"),
// "tns-core-modules/file-system/file-system-access": path.resolve(__dirname, "polyfills", "file-system-access"),
// "tns-core-modules/utils/utils": path.resolve(tnsCoreModules, "utils/utils-common"),
// "tns-core-modules/color": path.resolve(tnsCoreModules, "color/color-common"),
// "tns-core-modules/ui/styling/font": path.resolve(tnsCoreModules, "ui/styling/font-common"),
// "tns-core-modules/ui/styling/background": path.resolve(tnsCoreModules, "ui/styling/background-common"),
"tns-core-modules/platform": path.resolve(__dirname, "polyfills", "platform"),
"tns-core-modules/file-system/file-system-access": path.resolve(__dirname, "polyfills", "file-system-access"),
"tns-core-modules/utils/utils": path.resolve(tnsCoreModules, "utils/utils-common"),
"./mainthread-helper": path.resolve(__dirname, "polyfills", "mainthread-helper"),
"tns-core-modules/color": path.resolve(tnsCoreModules, "color/color-common"),
"tns-core-modules/ui/styling/font": path.resolve(tnsCoreModules, "ui/styling/font-common"),
"tns-core-modules/ui/styling/background": path.resolve(tnsCoreModules, "ui/styling/background-common"),
"tns-core-modules": tnsCoreModules,
"~": __dirname