mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
two more tests added
This commit is contained in:
@@ -59,6 +59,24 @@ export function test_loadWithOptionsWithXML() {
|
||||
TKUnit.assert(v instanceof view.View, "Expected result: View; Actual result: " + v + ";");
|
||||
};
|
||||
|
||||
export function test_loadWithOptionsFromTNS() {
|
||||
var v = builder.load({
|
||||
fileName: "ui/label",
|
||||
componentName: "Label"
|
||||
});
|
||||
|
||||
TKUnit.assert(v instanceof labelModule.Label, "Expected result: Label; Actual result: " + v + ";");
|
||||
};
|
||||
|
||||
export function test_loadWithOptionsFromTNSPath() {
|
||||
var v = builder.load({
|
||||
fileName: "tns_modules/ui/label",
|
||||
componentName: "Label"
|
||||
});
|
||||
|
||||
TKUnit.assert(v instanceof labelModule.Label, "Expected result: Label; Actual result: " + v + ";");
|
||||
};
|
||||
|
||||
export function test_parse_ShouldNotCrashWithoutExports() {
|
||||
var fileAccess = new fileSystemAccess.FileSystemAccess();
|
||||
|
||||
@@ -178,7 +196,7 @@ export function test_parse_ThrowErrorWhenNestingPlatforms() {
|
||||
} catch (ex) {
|
||||
e = ex;
|
||||
}
|
||||
|
||||
|
||||
TKUnit.assert(e, "Expected result: Error; Actual result: " + e);
|
||||
};
|
||||
|
||||
|
||||
2
ui/builder/builder.d.ts
vendored
2
ui/builder/builder.d.ts
vendored
@@ -9,6 +9,6 @@ declare module "ui/builder" {
|
||||
export interface LoadOptions {
|
||||
fileName: string;
|
||||
componentName: string;
|
||||
exports: any;
|
||||
exports?: any;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user