-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Adding this library to an Angular 2 project using Jasmine #59
Comments
What was the resolution please? Out of interest.
Thanks.
|
I've added the resolution in the EDIT section of my previous comment:
Is needed to add this resolution in any other section? I think, this is the unique thing to do, for me it works, but I'm not an Angular expert. So maybe something more is needed or another way to do. |
Also interested in current typings for this library. The ones Definitely Typed appear to be out of date. (Many libraries are including them in the NPM package now instead, which is better because it help ensure the version of the typings matches the library's API). I'm using it in an Angular 2 project (using the current angular cli, which incorporates Karma for running tests). The matchers I've tried work great, but throw linting errors since typings are not present. |
I've yet to use TypeScript @aaronbroad but if someone were to pull request how to include the typings as part of this project I'd be happy to keep them up to date from there on. I see the Definitely Typed ones are here https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/jasmine-expect/jasmine-expect.d.ts. |
Ah, the ones I found were more out of date (v0.2.1): I have not published types to npm before, but best I can tell it involves adding a
The file you referenced looks closer to the current API. I'll submit a pull request reflecting this version and perhaps you could take a look and see which matchers are missing? |
Sounds good, thanks a lot.
|
Hi all!
I think this is not an issue but can be an improvement in the doc.
I'm developing an Angular 2 RC5 app with Jasmine and I'm trying to load this library.
What I've done is:
In a
unit-tests.html
file I've included the following:And then, I've created a Spec file, like this:
But when I run the app, with
npm test
this error occurs:So I don't know how to import this matcher inside the Spec file.
Any help is appreciate ;)
Thanks!
[EDIT]
As I mentioned, I believe this is not an issue, because I finally solve this problem. I've missed some important thing to do, considering I'm using TypeScript:
typings install dt~jasmine-expect --save-dev -DG
With this, a
globalDevDependencies
is added in filetypings.json
and this library is available to use.I think that the documentation is great and very useful, but maybe it could be improve with a section explain how to use with TypeScript.
Thanks a lot!
The text was updated successfully, but these errors were encountered: