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

`write` does not meet expectations. #222

Open bvanjoi opened 2 years ago

bvanjoi commented 2 years ago

name which got from let name = group.shift() is a function created by runner.bind, it had printed unexpected log in terminal. Location of these code is https://github.com/lukeed/uvu/blob/master/src/index.js#L138.

image

mabe rewrite it to if (typeof name === 'string') // xxxx could solve this problem.

bvanjoi commented 2 years ago

This problem caused by UVU_QUEUE[0] is not empty when exec is re-executed, so instead of for (let test of group) (code) by while (group.length > 0) { let test = group.shift()} is better choice.