-
-
Notifications
You must be signed in to change notification settings - Fork 241
Not able to configure a module from TestBed.configureTestingModule #479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@NathanWalker I saw you were showing examples on tests during the developer day workshop (https://nativescript.github.io/developer-day-workshop/#chapter6.8) and actually being able to configure a TestBed, some clue you can give me on why it is not finding the Zone ?. Thanks in advance! |
related to #478 |
try this:
worked for me |
I get
|
TestBed isn't supported officially supported yet. It seems great some people are able to get it working, but we haven't put any dedicated effort into it so far. |
is it planned to support it? |
No, it isn't planned for any of the upcoming releases. We'd consider a PR if someone is willing to investigate this. |
What way is then for now adviced to test NG2 apps? |
you can take a look at my angular sample here: https://github.com/TobiasHennig/nativescript-toast/blob/master/samples/angular/app/tests/app.component.spec.ts I've using TestBed: https://github.com/TobiasHennig/nativescript-toast/blob/master/samples/angular/app/tests/setup.js you can check it for yourself, just clone the repo:
|
@hypery2k Does this still run for you? Using NativeScript 3, with Karma (and the rest of the setup like yours). |
@hauthorn I just tried @hypery2k's config and I got the same error:
BTW, does your console also have all the @file and |
Is TestBed supported in NativeScript? It seems like there are a bunch of potential workarounds that everyone tries, but without success. It is very important for my team to be able to use TestBed to initialize components which have numerous dependencies. |
Hey, I have been working on trying to get TestBed configured properly in NativeScript for a month now and still haven't gotten it. The example provided is not sufficient as I have attempted to reproduce it and still face issues. I am unsure of what I am doing wrong. Please checkout my Stack Overflow question if you have been able to get TestBed working in NativeScript I would very much appreciate it. |
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:
Which platform(s) does your issue occur on?
iOS
Please provide the following version numbers that your issue occurs with:
tns-core-modules: 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.
Copied from original issue: NativeScript/NativeScript#2814
The text was updated successfully, but these errors were encountered: