Closed ftaiolivista closed 4 years ago
Does it work with a previous Node.js version? The changes are insignificant: https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V12.md#12.16.2
This works for me, locally:
❯ node -v v12.16.2
❯ cat test.js const test = require('ava')
test('foo', t => {
t.pass()
})
test('bar', async t => {
const bar = Promise.resolve('bar')
t.is(await bar, 'bar')
})
❯ npx ava test.js
2 tests passed
(I'm closing this issue for housekeeping purposes, but let's keep the conversation going.)
You are right. Cleaned yarn cache, reinstalled project and deps and now it works. Thank you.
Install AVA
Create a simple test file
const test = require('ava')
test('foo', t => { t.pass() })
test('bar', async t => { const bar = Promise.resolve('bar') t.is(await bar, 'bar') })
Result:
NODE DUMP