Skip to content

Conversation

@MagicAardvark
Copy link

No description provided.

@stonelasley
Copy link
Owner

@MagicAardvark Thank you for the PR. As I stated previously I've never used jest so I'm coming at this from ignorance. How does this fix the problem in Jest? I'm comparing your createSpyObj function with jasmines and it looks like it's doing nearly the same thing it just has some checks removed.

https://github.com/jasmine/jasmine/blob/8ad9abb19a7fe4e686a86b7896cd20c554a4830a/src/core/base.js#L194

@MagicAardvark
Copy link
Author

Thanks for checking it out. So this fixes it for jest because jest does not expose jasmines createSpyObject method. so this PR is create a version of jasmines method that can be provided to jest.

Looks like they have updated the createSpyObject method so theoretically it should work with this new one. I can test today and update my PR to have the additional checks.

@stonelasley
Copy link
Owner

@MagicAardvark, thanks again. I'll merge this in as soon as I have time to test it against a couple projects I have. I also need to get caught up on tests. Feel free to throw in a couple test files ;)

@MagicAardvark
Copy link
Author

Did you have an opportunity to review this?

@danielsogl
Copy link

I published the Jest version here: https://www.npmjs.com/package/ionic-mocks-jest

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.

3 participants