Skip to content
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

(Unit testing) using Karma test runner #399

Merged
merged 4 commits into from
Sep 4, 2017
Merged

(Unit testing) using Karma test runner #399

merged 4 commits into from
Sep 4, 2017

Conversation

davidsekar
Copy link
Contributor

@davidsekar davidsekar commented Sep 4, 2017

  1. Based on reply in Angular CLI project project thread.
    Feature request: Support using Jest testing framework angular/angular-cli#4543 (comment)

  2. I was unable to write unit test for the contents shown on ngx-bootstrap modal, as the BsModalService requires
    window.getcomputedstyle().getpropertyvalue(), which is hard to polyfill in jsDom (used by Jest)

  3. Code coverage using istanbul

  4. In favour of readme file

Unit testing with Jest (Going back to Karma soon)

@davidsekar
Copy link
Contributor Author

davidsekar commented Sep 4, 2017

Ideas borrowed from

  1. JavascriptServices - Angular SPA
  2. AngularClass/angular-starter

@MarkPieszak
Copy link
Member

This is fantastic! Yeah I think ideally we might as well stick with the default as Jest doesn't offer the same type of testing. I'll move the Jest stuff into a HOW TO PR, for others to see at least!

👍👍🍻🍻

@MarkPieszak MarkPieszak merged commit 9e2583d into TrilonIO:master Sep 4, 2017
@jrmcdona
Copy link
Contributor

I deleted ngx-bootstrap from my app. Do I need to worry about this?

Is this a bigger issue or is this PR just to fix testing ngx-bootstrap modal testing?

@jrmcdona
Copy link
Contributor

@davidsekar @MarkPieszak Is this something I need to be pulling in? Or just an issue with testing ngx-bootstrap which I don't use in my app

@MarkPieszak
Copy link
Member

It's up to you, this is just if you want the traditional way Karma does testing (with a browser) as opposed to Jest, which can't do that. @jrmcdona

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.

3 participants