-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Merge factory function into testCommon parameter #268
Conversation
require('./test/iterator-test').tearDown(test, testCommon) | ||
|
||
require('./test/iterator-range-test').setUp(factory, test, testCommon, []) | ||
require('./test/iterator-range-test').setUp(test, testCommon, []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now the api is almost identical for all test functions, except for two tests in test/iterator-range-test.js
which takes an additional data
parameter. Which bugs me a bit 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could make that internal by only exporting all
, because this file only has setUp
, range
and tearDown
- that's one test. We only have to export "subtests" if there are multiple, and if they should be skippable.
I don't know if now is the right time, but we can also make an effort to split tests files in such a way that you'd only exclude files, not subtests. Then each file only needs one export.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
=> #270
module.exports.batch(test) | ||
module.exports.atomic(test) | ||
module.exports.setUp(test, testCommon) | ||
module.exports.args(test, testCommon) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to tack on testCommon
everywhere, even if it's not used in some tests. Just to make it more symmetric.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't standard complain about that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought so as well.
Closes #227