mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-03 03:30:04 +08:00
fix: ensure Application instance initialized early (#10315)
This commit is contained in:
@ -370,3 +370,6 @@ function isTestingEnv() {
|
||||
if (!global.NativeScriptHasInitGlobal && !isTestingEnv()) {
|
||||
initGlobal();
|
||||
}
|
||||
|
||||
// ensure the Application instance is initialized before any other module imports it.
|
||||
require('@nativescript/core/application');
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
// @ts-nocheck
|
||||
|
||||
jest.mock('@nativescript/core/application', () => null, { virtual: true });
|
||||
|
||||
global.__DEV__ = true;
|
||||
global.WeakRef.prototype.get = global.WeakRef.prototype.deref;
|
||||
global.NativeClass = function () {};
|
||||
|
||||
Reference in New Issue
Block a user