Ninja-Squad / ngx-speculoos

Simpler, cleaner Angular unit tests
https://ngx-speculoos.ninja-squad.com/
MIT License
74 stars 3 forks source link

feat(matchers): provide matchers for jest #49

Open davinkevin opened 6 years ago

davinkevin commented 6 years ago

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

cexbrayat commented 6 years ago

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.

davinkevin commented 6 years ago

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.