lukeed / uvu

uvu is an extremely fast and lightweight test runner for Node.js and the browser
MIT License
2.98k stars 99 forks source link

support waiting for test.run() #221

Closed hardfist closed 2 years ago

hardfist commented 2 years ago

I want to generate test case on the fly, but it seems I can't wait wait for the dynamic case finished by waiting test.run()

const { test } = require('uvu');
const assert = require('assert');
test("hello", () => {
  console.log('middle');
  assert.equal(1,1);
})
async function main(){
  console.log("begin");
  await test.run(); // not working
  console.log('end');
}

main();
lukeed commented 2 years ago

Yep, it’s planned. Duplicate of #38