Comments (6)
Ah, the ones I found were more out of date (v0.2.1):
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/types-2.0/jasmine-matchers/index.d.ts
I have not published types to npm before, but best I can tell it involves adding a types
property to package.json that includes the path to the declaration file, something like:
"types": "./jasmine-matchers.d.ts"
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?
from jasmine-matchers.
from jasmine-matchers.
I've added the resolution in the EDIT section of my previous comment:
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 file typings.json and this library is available to use.
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.
from jasmine-matchers.
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.
from jasmine-matchers.
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.
from jasmine-matchers.
from jasmine-matchers.
Related Issues (20)
- Usage from Jest in Typescript HOT 6
- toBeCloseToArray and toBeCloseToObject matches HOT 1
- Optional messages broken in 4.0.0 HOT 4
- Jasmine Matchers not working on Angular 7 and Karma HOT 11
- Jasmine-Matchers on protractor project. HOT 1
- Use `jasmine-expect` in `beforeAll` without `describe` will throw exception HOT 1
- toContainSubstring HOT 3
- Documentation on String Matchers is out of date
- Add support for withContext? HOT 2
- Typescript mismatch with toBeTrue/toBeFalse as of @types/jasmine 3.5.0 HOT 6
- Q: Does `npm install expect` support custom matchers? HOT 1
- Q: How to use with TypeScript? HOT 4
- Synchronize the release on github with the release on npm
- Property 'toBeWithinRange' does not exist on type 'Matchers<void>' HOT 8
- Update Browserstack browsers list
- Asymmetric Matchers not working in Jest HOT 1
- TypeScript error: All declarations of 'Matchers' must have identical type parameters. HOT 1
- Where are the <something>OrNull expectations? HOT 1
- Question: How to use jasmine-matchers with gulp-jasmine? HOT 1
- How to access Jasmine when it is an AMD module instead of a global? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jasmine-matchers.