ben-page / node-test

A simple, asynchronous test runner for Node.js.
https://www.npmjs.com/package/node-test
MIT License
4 stars 1 forks source link

use options, not this, maybe? #8

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hey! I had a look at AVA. You are passing the option object to Test, and create e.g. this._only. And then in the Suite, you are checking like this: test._only

In Ava Test doesn't have any options. In fact the option object is passed in as a single argument to the run() function in the Runner / Suite.

https://github.com/avajs/ava/blob/master/lib/runner.js#L198-L199

Could it be a good idea?