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

Bug: jasmine-marbles with jest #828

Closed
Bielik20 opened this issue Oct 18, 2018 · 2 comments
Closed

Bug: jasmine-marbles with jest #828

Bielik20 opened this issue Oct 18, 2018 · 2 comments
Labels

Comments

@Bielik20
Copy link
Contributor

Description

nrwl: 6.4.0
test-runner: jest

const value = of('foo');
const expected = of('foo');
expect(value).toBeObservable(expected);

Current Behavior

jasmine-marbles does not work with jest. When running tests I get TypeError: expect(...).toBeObservable is not a function.

Expected Behavior

jasmine-marbles should work with jest.

Rationale

When following the jest-preset-angular guide and adding jest to a standard angular-cli project jasmine-marbles work as expected. But when using nx built-in support for jest jasmine-marbles do not work.

I think it is worth noting that VSCode detects that test methods (expect, describe etc.) are from jest in an nx project. However, in an angular-cli project it points to @types/jasmine.

Alternatives

jest-marbles work but lack some of jasmine-marbles functionalities.

@FrozenPandaz
Copy link
Collaborator

Fixed by:

CodeSequence/jasmine-marbles@2bc640e

You can now use jasmine-marbles with jest 🎉

Re: I think it is worth noting that VSCode detects that test methods (expect, describe etc.) are from jest in an nx project. However, in an angular-cli project it points to @types/jasmine.

Refer to #816

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants