Comments (9)
Thanks for this @michael42.
Integration with Node is currently the most awkward aspect of this project. I agree that some kind of method is needed such as require('jasmine-expect').register()
(or similar) to get around this problem.
from jasmine-matchers.
/cc to users who've opened issues on this project before, a question for you. How do you tend to include Jasmine Matchers on a Node.js project? I'm trying to think of what might be the best way to do it — and I'm pretty sure it will require an API change.
Thanks.
@Hemins @JessicaSachs @MathRobin @PaulTondeur @RALifeCoach @alecxe @anisylen @atruskie @cryptoquick @endorama @jasonjohnson115 @jelinson @jhuesos @jrencz @message @michael42 @mohit-excelindia @mrozbarry @mull @pavelmigolinets @rkawala @tandrewnichols @xuxiankun
from jasmine-matchers.
We're only including it once in our of our jest specs by simply importing it. Sorry I can't be of more help :/
from jasmine-matchers.
Same as @mull. Include it once within our Jasmine specs and let it rip.
from jasmine-matchers.
Thanks @mull @anisylen. I had thought that just including require('jasmine-expect')
at the very start of your spec was all that was needed to include this in node, but I could see how it could be possible that the behaviour @michael42 describes could happen.
Could it be that this has been fixed since it was opened? @michael42 can you confirm?
Thanks.
from jasmine-matchers.
I can confirm the include as @mull and @anisylen are describing.
from jasmine-matchers.
We are including it in a helper file, and our setup looks like this:
spec/support/jasmine.json:
{
"spec_dir": "spec",
"spec_files": [
"**/*.spec.js"
],
"helpers": [
"helpers/*.js"
]
}
spec/helpers/extra.js:
// ...
require('jasmine-expect');
// ...
from jasmine-matchers.
Thanks all, ok I think this is working then and can be closed.
from jasmine-matchers.
Hi! You should post this on the readme.md. This is like a how-to-use with gulp-jasmine.
Thanks! 👍
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.