Comments (6)
jasmine 3.5 now has it's own toBeTrue
and toBeFalse
matchers, so they could just be removed from this library.
from jasmine-matchers.
@JamieMason Would you be willing to accept a PR to remove expectationFailOutput?: any
parameter from .toBeTrue()
and .toBeFalse()
matchers to prevent conflict with built-in matchers with the same name available as of Jasmine 3.5.0? This will require a major release as it is a breaking change.
Not suggesting complete removal of the matchers as Jest does not have them and also because it will affect more people then removal of the optional parameter.
For Jasmine expectationFailOutput
works because of an implementation detail and is not a supported usage. That's why Jasmine 3.3.0 introduced .withContext()
as supported way to add more information to the assertion.
Not sure how does this influence Jest users of the library though.
PS I will also try to deprecated expectationFailOutput
parameters in @types/jasmine
package in the coming weeks. If that goes through it should be a good idea to deprecate this parameter in all jasmine-expect
matchers, so people would migrate from the unsupported usage.
from jasmine-matchers.
Hi,
I ran into the same problem with Jasmine in an Angular project. I managed to solve it by removing the jasmine-expect
entry that I had in my tsconfig.spec.json
file:
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
"types": [
"jasmine",
"node",
"jasmine-expect" # Removed this Line.
]
},
"files": [
"test.ts",
"polyfills.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}
from jasmine-matchers.
Is there any progress on this @JamieMason? The read me details that this library supports all versions of jest and Jasmine; but currently doesn't work with the last few releases of Jasmine.
A huge library of test matchers for a range of common use-cases, compatible with all versions of Jasmine and Jest.
from jasmine-matchers.
Had to revert back to Jasmine Core 3.4.0 to get around this issue for now.
from jasmine-matchers.
Did anyone here find a better workaround than pinning down Jasmine and its types to 3.4 until this gets fixed for good?
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
- 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.