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

Feedback #367

Closed
dy opened this issue Dec 25, 2015 · 8 comments
Closed

Feedback #367

dy opened this issue Dec 25, 2015 · 8 comments
Labels

Comments

@dy
Copy link

dy commented Dec 25, 2015

Hello!
Thanks for the wonderful runner. Mocha really seems to be a pain when it comes to running tests in browser.
But there are UX issues with ava, which made my friend upset.

  1. Installing time. For mocha, it takes about 4-5 times less to install than ava. Is there a sense in prepublish script, which just compiles all the thing and publishes the bundle? What are the reasons not to?
  2. Launching time. It feels 2-3 times slower than mocha to run ava via npm test, on the latest node (5.3.0). That UX is really to the contrary of the described in readme, I really anticipated the opposite.
  3. Default formatter. The third great frustration is that mocha by default writes the essence of debugging info - code lines, if tests failed. Ava just soaks up all the debugging juice, leaving with the fact that there is a mistake, making itself useless in debugging. Installing and testing various reporters is not really an option, the default behavior is expected to be at least not worse than mocha.
  4. It crashes beefy. It does not seem to be ava’s issue (beefy started dong so a while ago), it is just unmet expectation. The killer-feature, I thought, for ava, would be able to launch tests in browser like beefy test.js, which is super-awesome comparing to the way mocha does browser tests. But it crashes beefy, mocha does not...

Sorry for that, thank you for understanding and hope you will find use in these complaints.

@jamestalmage
Copy link
Contributor

browsers...

AVA does not (yet) support browser side testing.

install time

Mocha doesn't ship with Babel or power-assert, we do.

Launching time.

Make sure you use npm@3 to install. Babel loads slow on npm@2. Transform caching is coming - major speed bump. Babel is always going to introduce extra startup delay.

Default formatter.

I need more details before responding. Got a sample program and stack trace?

@sindresorhus
Copy link
Member

  1. The biggest overhead in installing is installing Babel, but that's also AVA's greatest strength. The ability to use ES2015+ syntax and features while still supporting old Node.js versions. Bundling everything into one file would make startup a LOT slower as the whole file would have to be parsed on startup. Keep in mind that you don't install AVA that often and npm caches the dependencies, so this shouldn't be that much of an issue.
  2. I would like to see some numbers on that claim, but the biggest performance gain using AVA is not for tiny test files, but larger ones. Tests doing a lot of IO will have the biggest gain. Although, we have worked hard on performance lately and the next AVA version has caching, which will help a lot on the startup time. The version after that will improve even more. The launch overhead is mostly caused by transpiling the test files with Babel.
  3. Unclear what you're missing here? We output detailed failing assertions and the stack. We don't yet do diffing, but you can achieve that by using a 3-party reporter using the new $ ava --tap option (in the next version).
  4. No browser support yet. → Browser support #24

@sindresorhus sindresorhus changed the title UX issues Feedback Dec 25, 2015
@dy
Copy link
Author

dy commented Dec 25, 2015

I wanted to switch to ava in audio-buffer-utils, but will wait for a moment. var test = it found it's way for now :)
3. Example test.js:

var test = require('ava');

function f () {
    xxx
}

test('xxx', function () {
    f()
});

Running ava:
image

Mocha goes:
image

It is git bash in windows 7, that may be an issue, IDK.

@jamestalmage
Copy link
Contributor

I think that is an AVA bug. We don't print stack traces if it's not an assertion error. The fix for that is already in development.

@vadimdemedes
Copy link
Contributor

The fix for stack traces is already in master ;)

@ariporad
Copy link
Contributor

@dfcreative, can this be closed?

@dy
Copy link
Author

dy commented Dec 27, 2015

Sure, if each notice is known. Thank you.

@dy dy closed this as completed Dec 27, 2015
@jamestalmage
Copy link
Contributor

@dfcreative 0.10.0 is out and should improve on issues 2 (startup time) and 3 (output formatting)

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

No branches or pull requests

5 participants