|
1 |
| -/* tslint:disable:ordered-imports */ |
2 |
| -/* tslint:disable:prefer-template */ |
3 |
| -import * as TKUnit from "./TKUnit"; |
| 1 | +/* tslint:disable:prefer-template */ |
| 2 | +import { exit } from 'nativescript-exit'; |
4 | 3 | import { _resetRootView, getRootView } from "tns-core-modules/application";
|
| 4 | +import * as fs from "tns-core-modules/file-system"; |
| 5 | +import * as platform from "tns-core-modules/platform"; |
| 6 | +import * as trace from "tns-core-modules/trace"; |
5 | 7 | import { messageType } from "tns-core-modules/trace";
|
6 |
| -import { topmost, Frame, NavigationEntry } from "tns-core-modules/ui/frame"; |
7 |
| -import { Page } from "tns-core-modules/ui/page"; |
8 |
| -import { TextView } from "tns-core-modules/ui/text-view"; |
9 | 8 | import { Button } from "tns-core-modules/ui/button";
|
10 |
| -import { StackLayout } from "tns-core-modules/ui/layouts/stack-layout"; |
11 |
| -import * as platform from "tns-core-modules/platform"; |
12 |
| -import "./ui-test"; |
13 |
| -import * as fs from "tns-core-modules/file-system"; |
14 | 9 | import { unsetValue } from "tns-core-modules/ui/core/properties";
|
| 10 | +import { Frame, NavigationEntry, topmost } from "tns-core-modules/ui/frame"; |
| 11 | +import { StackLayout } from "tns-core-modules/ui/layouts/stack-layout"; |
| 12 | +import { Page } from "tns-core-modules/ui/page"; |
| 13 | +import { TextView } from "tns-core-modules/ui/text-view"; |
15 | 14 | import { ad } from "tns-core-modules/utils/utils";
|
16 |
| -import { exit } from 'nativescript-exit'; |
| 15 | + |
| 16 | +import * as TKUnit from "./TKUnit"; |
| 17 | +import "./ui-test"; |
| 18 | + |
| 19 | +// When debugging |
| 20 | +// trace.setCategories(trace.categories.concat( |
| 21 | +// trace.categories.Test, |
| 22 | +// trace.categories.Navigation, |
| 23 | +// trace.categories.Transition, |
| 24 | +// trace.categories.NativeLifecycle, |
| 25 | +// trace.categories.ViewHierarchy, |
| 26 | +// trace.categories.VisualTreeEvents |
| 27 | +// )); |
17 | 28 |
|
18 | 29 | const env = require('./environment.json');
|
19 | 30 |
|
| 31 | +const traceCategories = [ |
| 32 | + trace.categories.Test, |
| 33 | + trace.categories.Error, |
| 34 | +]; |
| 35 | + |
| 36 | +if (!env.ci) { |
| 37 | + traceCategories.push("NOTA"); |
| 38 | +} |
| 39 | + |
| 40 | +trace.enable(); |
| 41 | +trace.addCategories(traceCategories.join(",")); |
| 42 | + |
20 | 43 | Frame.defaultAnimatedNavigation = false;
|
21 | 44 |
|
22 | 45 | export function isRunningOnEmulator(): boolean {
|
@@ -212,7 +235,7 @@ export function runAll(testSelector?: string) {
|
212 | 235 | }
|
213 | 236 | }
|
214 | 237 |
|
215 |
| - console.log(`TESTS: ${singleModuleName || ''} ${singleTestName || ''}`); |
| 238 | + TKUnit.write(`TESTS: ${singleModuleName || ''} ${singleTestName || ''}`); |
216 | 239 |
|
217 | 240 | const totalSuccess = 0;
|
218 | 241 | const totalFailed: Array<TKUnit.TestFailure> = [];
|
|
0 commit comments