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

Please add support for ava testing assertions :) #283

Closed
kristianmandrup opened this issue Nov 2, 2016 · 3 comments
Closed

Please add support for ava testing assertions :) #283

kristianmandrup opened this issue Nov 2, 2016 · 3 comments
Labels
stage: wontfix Cypress does not regard this as an issue or will not implement this feature type: feature New feature that does not currently exist

Comments

@kristianmandrup
Copy link

This is a must! Ava is the future of javascript testing :)

@kristianmandrup kristianmandrup changed the title Please add support for ava testing library and ava assertions :) Please add support for ava testing assertions :) Nov 2, 2016
@kristianmandrup
Copy link
Author

Please also add support for testdouble.js the modern replacement for the old and dusty sinon.js

@jennifer-shehane jennifer-shehane added the type: feature New feature that does not currently exist label Nov 2, 2016
@ghengeveld
Copy link

ghengeveld commented Jan 16, 2017

This seems primarily opinion-based. Integrating AVA would probably mean supporting it's syntax, not it's features, in which case I see no benefit other than being able to write your Cypress tests in a familiar style if you're using AVA for unit testing. There's already support for two 'flavors' (cy.should and expect/assert) which have their own use cases. I see no reason to complicate things even further by adding a third option, at least not as a built-in feature.

As for TestDouble, it seems to hardly provide any benefit over Sinon, other than having a more compact and arguably simpler API. I believe Cypress uses Sinon because the whole XHR mocking system is based on Sinon's useFakeXMLHttpRequest. I'd prefer to have neither embedded into Cypress, but be able to easily integrate one or the other as the need arises. The same goes for making assertions, but that would probably be way too much work, not to mention overcomplicate everything.

@brian-mann
Copy link
Member

Yah AVA's primary benefits are in node land which have no equivalency in the browser, and especially not in integration/e2e tests. Even though you could run unit tests in isolated web workers, there can be only one DOM and one URL which cannot be run in parallel. The only way to parallelize a browser is at the OS level - you cannot even run two browsers at the same time in the same OS because only a single application can only ever have focus.

@ghengeveld we actually don't use sinon's useFakeXMLHttpRequest, we wrote our own routing / stubbing layer. We do use sinon for stub/spy and we're currently working on the bona-fide integration + docs with it right now. https://github.com/cypress-io/cypress/projects/19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: wontfix Cypress does not regard this as an issue or will not implement this feature type: feature New feature that does not currently exist
Projects
None yet
Development

No branches or pull requests

4 participants