Files
NativeScript/tests/app/app/mainPage.ts
Manol Donev 03cfc0cee3 chore(tslint): update tslint rules and fix errors (#5747)
* chore(tslint): fix tslint config & errors
* chore(tslint): enable double quotes, whitespace, and arrow-return-shorthand rules and fix errors
2018-04-26 18:36:32 +03:00

27 lines
705 B
TypeScript

import { Page } from "tns-core-modules/ui/page";
import * as trace from "tns-core-modules/trace";
import * as tests from "../testRunner";
trace.enable();
trace.addCategories(trace.categories.Test + "," + trace.categories.Error);
// When debugging
// trace.setCategories(trace.categories.concat(
// trace.categories.Test,
// trace.categories.Navigation,
// trace.categories.Transition,
// trace.categories.NativeLifecycle,
// trace.categories.ViewHierarchy,
// trace.categories.VisualTreeEvents
// ));
function runTests() {
setTimeout(() => tests.runAll(""), 10);
}
export function onNavigatedTo(args) {
args.object.off(Page.loadedEvent, onNavigatedTo);
runTests();
}