You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Not able to configure a module from TestBed.configureTestingModule #479
TypeError: undefined is not an object (evaluating 'ProxyZoneSpec.assertPresent') (line 178439)
resetFakeAsyncZone
attemptSync
run
execute
execute
queueRunnerFactory
execute
fn
attemptAsync
run
execute
execute
queueRunnerFactory
fn
attemptAsync
run
execute
invokeTask
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.
@hauthorn Check this out: #733. I was able to fix that setGlobalVar method by just writing over it. Not sure if this is the right thing to do...but TestBed works for me now.
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.
Reacted by Tomas, yasser, Otacilio Oliveira (Neto) and George Savchenko
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.
Activity
ignaciolarranaga commentedon Sep 29, 2016
@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!
hypery2k commentedon Oct 6, 2016
related to #478
hypery2k commentedon Oct 6, 2016
try this:
worked for me
camiloazula commentedon Dec 8, 2016
I get
hdeshev commentedon Dec 9, 2016
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.
camiloazula commentedon Dec 9, 2016
is it planned to support it?
hdeshev commentedon Dec 9, 2016
No, it isn't planned for any of the upcoming releases. We'd consider a PR if someone is willing to investigate this.
camiloazula commentedon Dec 11, 2016
What way is then for now adviced to test NG2 apps?
hypery2k commentedon Dec 12, 2016
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:
cboisen commentedon Jul 11, 2017
@hypery2k Does this still run for you?
I get:
Error: Not implemented! at NativeScriptDomAdapter.setGlobalVarUsing NativeScript 3, with Karma (and the rest of the setup like yours).
kamok commentedon Jul 24, 2017
@hauthorn I just tried @hypery2k's config and I got the same error:
BTW, does your console also have all the @file and
in filelines? How do I disable them, they're just noise to me.kamok commentedon Jul 24, 2017
@hauthorn Check this out: #733. I was able to fix that
setGlobalVarmethod by just writing over it. Not sure if this is the right thing to do...but TestBed works for me now.Ahnert1 commentedon Mar 29, 2019
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.
NickIliev commentedon Apr 15, 2019
@Ahnert1 here you can find an example on how to configure testBed in NativeScript
gsavchenko commentedon Jul 24, 2019
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.
https://stackoverflow.com/questions/57186925/how-to-implement-unit-tests-in-nativescript-using-testbed-and-jasmine