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

Support registering a custom assertion module #25

Closed
ColCh opened this issue Aug 28, 2015 · 6 comments
Closed

Support registering a custom assertion module #25

ColCh opened this issue Aug 28, 2015 · 6 comments

Comments

@ColCh
Copy link

ColCh commented Aug 28, 2015

How to use it? For example, Chai is very nice. Or assert.js

@sindresorhus sindresorhus changed the title Custom assertion library Support registering a custom assertion module Aug 28, 2015
@sindresorhus
Copy link
Member

Yes you can. Updated the readme about it: 3deba51

It won't work with planned assertions though. For that, we'll need an AVA method that hooks the assertion methods in the assertion module you supply so that it can do the assert counting. Shouldn't be that hard, but not top priority.

@ColCh
Copy link
Author

ColCh commented Aug 28, 2015

Thanks. Any tutorial on how to do that? Code sample will be cool.

@sindresorhus
Copy link
Member

How to do what? With assert counting is not possible yet as outlined above. Without assert counting is documented in the readme as already mentioned.

@sindresorhus
Copy link
Member

sindresorhus commented Nov 11, 2015

Please read the discussion in #49 before commenting.

We should support any assertion library, but have built-in "adapters" for the most popular ones. By "builtin adapter", I mean users can just pass the instance (e.g. chai) and have it just work.

@novemberborn
Copy link
Member

I think we've become quite comfortable with AVA's built-in assertions since this issue was raised. We won't be adding tight integration for other assertion libraries any time soon, so I'm closing this issue.

@sindresorhus
Copy link
Member

People can already use their favorite assertion module with AVA. It just won't work with planned assertions. That being said, I almost never use planned assertions anymore, now that we have async/await.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants