Skip to content

Is it ok for empty tests to return 1..0? #186

@ilg-ul

Description

@ilg-ul

I'm working on a C++ implementation and I would like to clarify the behaviour for empty tests.

A node-tap run with:

import t from 'tap'

t.test('Empty', (t): void => {
  t.end()
})

produces:

# Subtest: tests/tap/other/empty.ts
    # Subtest: Empty
        1..0
    ok 1 - Empty # time=2.246ms
    
    1..1
ok 1 - tests/tap/other/empty.ts # time=7128.479ms

The document with the TAP version 14 specs mentions a 1..0 case for skipped tests, but does not mention explicitly empty tests.

Can you confirm that 1..0 is the expected value for empty tests?

Thank you,

Liviu

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