Skip to content

Enable TestBed in nativescript #730

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

Closed
wants to merge 11 commits into from
Closed

Enable TestBed in nativescript #730

wants to merge 11 commits into from

Conversation

hypery2k
Copy link
Contributor

Fixes #478, #479 and #584

Currently having issues that the setup for TestBed is working, but other tests are failing:

START:
  ✖ "before each" hook for "creates component"

Finished in 0.091 secs / 0.001 secs

If I use it standalone all is working fine. Should I add a new test app for that?

@hdeshev
Copy link
Contributor

hdeshev commented Apr 3, 2017

This looks like it's related to #733 , yet it doesn't seem to touch the setGlobalVar implementation, so I'll assume it doesn't fix that issue.

@@ -0,0 +1,19 @@
require("reflect-metadata");
require("nativescript-angular/zone-js/dist/zone-nativescript");
require("zone.js/dist/long-stack-trace-zone");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NativeScript bundles its own version of zone.js, and requiring zone.js from the npm looks fishy. You could easily end up with two separate zone implementations and that will likely break things. I suggest we use nativescript-angular/zone-js everywhere.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that you also want to include the jasmine-patch + mocha-patch for unit testing? Those are currently necessary to run our tests and they're not included in nativescript-angular/zone-js.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hdeshev should i create a PR at nativescript-angular/zone-js?

}
require("zone.js/dist/async-test");
require("zone.js/dist/fake-async-test");
var testing_1 = require("@angular/platform-browser-dynamic/testing");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like code transpiled from TypeScript. Why not implement it in TypeScript instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i started with TypeScript, but had some issues with module dependencies, but will check it again

hypery2k and others added 10 commits April 13, 2017 15:57
#comment nodes should be added as views to 'actionBar' since they are anchors for the elements added by structural directive (*ngIf, *ngFor, etc.)

closes #725
The fix was not taking into account that view were being recycled
and was causing crashes due to prematurely destroying item views.
Instantiate child injectors with a providers' map for outlet specific
providers such as Page, PageRoute, ActivatedRoute, etc.

fixes #741
* Update package.json to v3.0.0

* Update description field

* Update CHANGELOG.md

* More deps and readme changes
@hypery2k
Copy link
Contributor Author

I think I will rebase my fork and make a new PR, or?

@sis0k0
Copy link
Contributor

sis0k0 commented Apr 13, 2017

Yes, that will be good, thank you :)

@hypery2k
Copy link
Contributor Author

see #751 and #752

@hypery2k hypery2k closed this Apr 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants