Open skeggse opened 7 years ago
I like it!
IMO the title function should remain on the macro (so no test.use(macro, title)
).
What would check.use(otherMacro)
do? Perhaps throw an exception?
@avajs/core?
I like it too, but I think it should be named test.macro()
for clarity instead of test.use()
.
The test
API should be available on these produced functions, e.g. check.skip()
, check.serial()
, check.cb()
.
Though perhaps not check.before()
, check.after()
etc.
I think this could be test.curry()
. Will investigate as part of #2435.
Description
I'd like to see a slightly simpler means to use the same macro for a large number of tests. Instead of specifying the macro at every call-site, it might be nice to have a
test.use(macro)
function that produces a newtest
function that will apply the macro to every invocation.Test Source
If interested, I might find the time to write a PR for this feature.