mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 11:01:21 +08:00
Merge pull request #7228 from NativeScript/svetoslavtsenov/fix-unit-tests
tests: fix require mainthread-module
This commit is contained in:
0
unit-tests/polyfills/mainthread-helper.ts
Normal file
0
unit-tests/polyfills/mainthread-helper.ts
Normal 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
|
||||
|
Reference in New Issue
Block a user