Use AVA Macro(s) for tests
ChristianMurphy opened this issue · 0 comments
ChristianMurphy commented
Version 0.15 will introduce Macros in the form:
function macro(t, input, expected) {
t.is(eval(input), expected);
}
macro.title = (providedTitle, input, expected) => `${providedTitle} ${input} === ${expected}`.trim();
test(macro, '2 + 2', 4);
test(macro, '2 * 3', 6);
test('providedTitle', macro, '3 * 3', 9);