Open ronnen opened 11 years ago
Related to this, it would be interesting to know what the policy is towards assertions in general: do you plan on adding more, or are we to make do with the existing ones?
I would like a test.contains, too, but if it clashes with your ideas I will keep using test.ok(arr.indexOf(val) !== -1)
.
I would like to add custom assertion so it can be used similarly to test.equal (e.g. test.contains).
The issue is that assert is required in two places: In nodeunit.js, and in types.js.
The assert in nodeunit is exported, the one in type is not. If this could be exposed then it would be very easy to add a custom assert and let the mechanism add them to test with the necessary wrapAssert. Without it, it's still possible to use custom assert but cannot add them to the test level.
Thanks.
Ronnen