Skip to content

Docs: Really, use t for assertions #1031

@danprince

Description

@danprince

I just tried to covert a project that's tested with tape over to using AVA instead. The tests all follow this kind of format:

test('function-a', (assert) => {
  assert.plan(1);

  assert.is(
    functionA(),
    resultB,
    'function a should return result b'
  );
});

They seem to run just fine under AVA, but the assertion messages don't show up when I create a failing test case, just the test messages.

Is there a way to report on the assertion messages? Or is the best practice just to wrap every one of these assertions in its own test block? (In which case, why do the assertions accept optional message parameters?

Am I missing something stupid?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions