holepunchto / brittle

Brittle TAP test framework
Apache License 2.0
81 stars 9 forks source link

non planned test passes when never ending #8

Closed mafintosh closed 3 years ago

mafintosh commented 3 years ago

Running this:

const test = require('brittle')

test('a', async function (t) {
  await new Promise((resolve) => {}) // never resolves
  t.pass('a')
})

Results in:

TAP version 13
# a
ok 1 - a # time=0.485583ms

1..1
# time=1.749166ms

It should have failed when a "no end" error equivalent

davidmarkclements commented 3 years ago

closed by https://github.com/davidmarkclements/brittle/commit/09f82251edd59f0d9d93c63ac410344b2b6744c4