Open
Description
From @ignaciolarranaga on September 28, 2016 21:3
Please, provide the details below:
Tell us about the problem
I can not configure a testing module, on the start of the tests it throws:
NativeScript / 9.1 (9.1; iPhone) ../../tests/shared/services/user.service.spec.js at line 0 FAILED
ReferenceError: Can't find variable: Zone
NativeScript / 9.1 (9.1; iPhone): Executed 1 of 0 (1 FAILED) ERROR (0.033 secs / 0 secs)
Which platform(s) does your issue occur on?
iOS
Please provide the following version numbers that your issue occurs with:
- CLI: 2.3.0
- Cross-platform modules:
tns-core-modules: 2.3.0 - Runtime(s): ios 2.3.0
Please tell us how to recreate the issue in as much detail as possible.
Just try to configure a test module
Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.
import { TestBed } from "@angular/core/testing";
import { NativeScriptModule } from "nativescript-angular/platform";
import { NativeScriptFormsModule } from "nativescript-angular/forms"
import { NativeScriptHttpModule } from "nativescript-angular/http";
import { UserService } from "../../../shared/services";
import { IdentifiedHttp } from "../../../shared/util";
describe("UserService tests", () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
NativeScriptModule,
NativeScriptFormsModule,
NativeScriptHttpModule,
],
declarations: [ UserService ],
providers: [ IdentifiedHttp ]
});
});
});
Copied from original issue: NativeScript/NativeScript#2814