forked from NativeScript/nativescript-angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
29 lines (27 loc) · 1.1 KB
/
index.ts
File metadata and controls
29 lines (27 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { NgModule } from "@angular/core";
import { TestComponentRenderer } from "@angular/core/testing";
import { NativeScriptTestComponentRenderer } from "./src/nativescript_test_component_renderer";
import { COMMON_PROVIDERS } from "../platform-common";
import { APP_ROOT_VIEW } from "../platform-providers";
import { testingRootView } from "./src/util";
export * from "./src/util";
/**
* Providers array is exported for cases where a custom module has to be constructed
* to test a particular piece of code. This can happen, for example, if you are trying
* to test dynamic component loading and need to specify an entryComponent for the testing
* module.
*/
export const NATIVESCRIPT_TESTING_PROVIDERS: any[] = [
COMMON_PROVIDERS,
{provide: APP_ROOT_VIEW, useFactory: testingRootView},
{provide: TestComponentRenderer, useClass: NativeScriptTestComponentRenderer},
];
/**
* NativeScript testing support module. Enables use of TestBed for angular components, directives,
* pipes, and services.
*/
@NgModule({
providers: NATIVESCRIPT_TESTING_PROVIDERS
})
export class NativeScriptTestingModule {
}