mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 21:01:34 +08:00
Make moduleMerge a global function - this saves a total of 83 requires upon application loading.
This commit is contained in:
@ -3,9 +3,7 @@ import app = require("application");
|
||||
import TKUnit = require("./TKUnit");
|
||||
import commonTests = require("./application-tests-common");
|
||||
|
||||
// merge the exports of the application_common file with the exports of this file
|
||||
declare var exports;
|
||||
require("utils/module-merge").merge(commonTests, exports);
|
||||
global.moduleMerge(commonTests, exports);
|
||||
|
||||
// <snippet module="application" title="application">
|
||||
// ### Using the Android-specific implementation
|
||||
|
@ -3,9 +3,7 @@ import app = require("application");
|
||||
import TKUnit = require("./TKUnit");
|
||||
import commonTests = require("./application-tests-common");
|
||||
|
||||
// merge the exports of the application_common file with the exports of this file
|
||||
declare var exports;
|
||||
require("utils/module-merge").merge(commonTests, exports);
|
||||
global.moduleMerge(commonTests, exports);
|
||||
|
||||
// <snippet module="application" title="application">
|
||||
// ### Adding a Notification Observer (iOS)
|
||||
|
@ -1,4 +1,2 @@
|
||||
import actionTestsCommon = require("./action-bar-tests-common");
|
||||
|
||||
declare var exports;
|
||||
require("utils/module-merge").merge(actionTestsCommon, exports);
|
||||
global.moduleMerge(actionTestsCommon, exports);
|
@ -6,8 +6,7 @@ import helper = require("../helper");
|
||||
import view = require("ui/core/view");
|
||||
import actionBar = require("ui/action-bar");
|
||||
|
||||
declare var exports;
|
||||
require("utils/module-merge").merge(actionTestsCommon, exports);
|
||||
global.moduleMerge(actionTestsCommon, exports);
|
||||
|
||||
export function test_NavBar_isVisible_when_MenuItems_areSet() {
|
||||
|
||||
|
@ -5,8 +5,7 @@ import PageTestCommon = require("./page-tests-common");
|
||||
import helper = require("../helper");
|
||||
import frame = require("ui/frame");
|
||||
|
||||
declare var exports;
|
||||
require("utils/module-merge").merge(PageTestCommon, exports);
|
||||
global.moduleMerge(PageTestCommon, exports);
|
||||
|
||||
export var test_NavigateToNewPage_WithAndroidCache = function () {
|
||||
var testPage: PageModule.Page;
|
||||
|
@ -4,8 +4,7 @@ import TKUnit = require("../../TKUnit");
|
||||
import LabelModule = require("ui/label");
|
||||
import helper = require("../helper");
|
||||
|
||||
declare var exports;
|
||||
require("utils/module-merge").merge(PageTestCommon, exports);
|
||||
global.moduleMerge(PageTestCommon, exports);
|
||||
|
||||
export function test_NavigateToNewPage_InnerControl() {
|
||||
var testPage: PageModule.Page;
|
||||
|
@ -12,9 +12,7 @@ import trace = require("trace");
|
||||
// enable the trace, it is disabled by default
|
||||
trace.enable();
|
||||
|
||||
// merge the exports of the view-tests-common file with the exports of this file
|
||||
declare var exports;
|
||||
require("utils/module-merge").merge(commonTests, exports);
|
||||
global.moduleMerge(commonTests, exports);
|
||||
|
||||
export var test_event_onAttached_IsRaised = function () {
|
||||
var listener = new Listener("_onAttached");
|
||||
|
@ -1,9 +1,7 @@
|
||||
import commonTests = require("./view-tests-common");
|
||||
import view = require("ui/core/view");
|
||||
|
||||
// merge the exports of the application_common file with the exports of this file
|
||||
declare var exports;
|
||||
require("utils/module-merge").merge(commonTests, exports);
|
||||
global.moduleMerge(commonTests, exports);
|
||||
|
||||
export function getNativeBorderWidth(v: view.View): number {
|
||||
return (<UIView>v.ios).layer.borderWidth;
|
||||
|
Reference in New Issue
Block a user