We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.
It does support aysnc out of the box. It states: "You can specify synchronous and asynchronous tests. Tests are considered synchronous unless you return a promise or observable.". So if you return a promise from your test, AVA will wait for that promise to resolve (asynchronously).
The line you are referring to is about defining the tests themselves. You can only define them synchronously (which makes sense, because your tests should not depend on anything), but they can run asynchronously.
So simple copying and pasting the example doesn't work. Error: t.equal is not a function
You didn't though ;)
There is a "t.deepEqual" for hardcore array and object comparison
Get'r dun!
who say Only one work?
I am testing vueJS application
right now. i added 3 function and all passed.
Thanks for the great article!
I included it in my "links" section of my article "A Complete Guide to Testing JavaScript in 2017":
https://medium.com/powtoon-...
Great intro, thanks! Here is a very simple Docker image with some examples: https://github.com/dcycle/d...
Great Post!! I have a couple of questions. I know angulajs comes down with karma. Would you say AVA is better?
Also , I think it would be cool to see a post on how to write a front-end SDK , best practices and advices.
Thank you !
Hi, thanks for your comment. Karma and AVA are not completely comparable, karma is just a tool to run tests in browser environments, not a testing framework like AVA. If you want to run AVA in a more browser-like environment (maybe to do DOM testing) you could use jsdom https://github.com/sindreso.... My advice would be, try out multiple options and see which one suits you best. What do you mean exactly with a writing a 'front-end SDK'?
AVA does not support async out of the box, the documentation says all tests must be defined synchronously. https://github.com/avajs/av...