Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support jest-circus #321

Merged
merged 1 commit into from
Jun 24, 2020
Merged

feat: support jest-circus #321

merged 1 commit into from
Jun 24, 2020

Conversation

L2jLiga
Copy link
Contributor

@L2jLiga L2jLiga commented Jun 23, 2020

Created generic addMatchers function which will handle Jasmine vs Jest ways

Signed-off-by: Andrey Chalkin L2jLiga@gmail.com

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[x] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: #314

What is the new behavior?

Use expect.extend from Jest to add custom matchers.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@NetanelBasal
Copy link
Member

Thanks for the PR. I'm not familiar with jest-circus. Can you give me some background about the fix?

@L2jLiga
Copy link
Contributor Author

L2jLiga commented Jun 23, 2020

I just noticed that I did not fix all - spies does not work. - seems to be ok

In this fix I introduced new file test-framework.ts (not sure is it fine enough name for it) which goal is to solve cross-framework issues like jasmine.addMatchers VS expect.extend in Jest and use it as framework independend API

@NetanelBasal
Copy link
Member

Yes, but what is the difference between jest and jest-circus that we need to add this fix?

@L2jLiga
Copy link
Contributor Author

L2jLiga commented Jun 23, 2020

Afaik jest have bundled jest-jasmine package and it enabled in default test runner while jest-circus is new runner which does not provide such functionality by default, especially global jasmine variable

Created generic `addMatchers` function which will handle Jasmine vs Jest ways

Signed-off-by: Andrey Chalkin <L2jLiga@gmail.com>
@NetanelBasal
Copy link
Member

Great, so we are sure it'll not cause any regressions, right?

@L2jLiga
Copy link
Contributor Author

L2jLiga commented Jun 24, 2020

No changes for Jasmine and expect.extend exsists in Jest for very long time. I think so

@NetanelBasal NetanelBasal merged commit fc9e6ec into ngneat:master Jun 24, 2020
@NetanelBasal
Copy link
Member

Cool, thanks.

@L2jLiga L2jLiga deleted the feature/jest-circus-support branch June 24, 2020 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants