Skip to content

node:test should be able to detect a plan has not been met #56758

Closed
@jsumners

Description

@jsumners

This issue stems from the conversation at fastify/fastify#5957 (review)

Given a test like:

test('a thing', (t) => {
  t.plan(2)

  doRequest('request 1', (error) => {
    t.assert.ifError(error)
  })

  doRequest('request 2', (error) => {
    t.assert.ifError(error)
  })
})

The test should wait until the defined timeout for both asserts to resolve. If only one resolves within the time limit, the test should fail due to the plan not being completed. From the linked conversation, this is not happening.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions