Ninja-Squad/ngx-speculoos

feat(matchers): provide matchers for jest

Opened this issue · 2 comments

Hi,

Like previously exposed (on twitter), I'm working with Jest on Angular. Are you interested in migrating the current matchers for the Jest world?

I will do a PR if you're ok.

Thanks

Hi, and thank you for taking the time to open an issue!

We don't use Jest with Angular, so we never tried to use custom matchers with it. If you think it's a good idea, you can try to add them to the library, PR welcome!

Ideally, the logic shared by the Jasmine and Jest matchers should be in common. Maybe a library like https://github.com/JamieMason/add-matchers can help? (I never used it, just found it by googling around, so there are maybe better alternatives).

Anyway, you're welcome to submit a PR and we'll give it a try. Ideally the PR should include a small demo (in the projects/demo application) and some documentation.

Thank for your answer. I will try to do the PR this week 😉 and I'm totally aligned with you about using jasmine matchers or at least share the same code for both jasmine & jest.