Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    Oh, okay - I did see the deferred object; didn't realize that's what it was for. Thanks! Commented Jul 27, 2015 at 15:48
  • 1
    Yeah, like I said, it's not very well documented :-( FWIW, I just pushed the first version of benchr, which is a Mocha-like wrapper around Benchmark.js, to make things a bit more easy. It's still a WIP though. Commented Jul 27, 2015 at 15:50
  • Oh awesome - I love mocha, and your syntax is definitely very familiar. I'll give it a go. What's the difference between benchr and bencha? Commented Jul 27, 2015 at 17:46
  • @opensourcejunkie AFAIK, bencha doesn't support asynchronous test cases at all. I also don't like the way it requires you to create a bench/ directory, and it's also not configurable. Commented Jul 27, 2015 at 18:02
  • gotcha, thanks. I tried it out yesterday, and I too wasn't thrilled with the configuration options (e.g. how it always runs the index.js instead of offering something like mocha --grep). It does support async though, in the same style as mocha - a done callback specified in the test function parameters. Thanks for all your help, and I look forward to seeing your solution in the repo! Commented Jul 28, 2015 at 16:53