logoalt Hacker News

q3ktoday at 10:15 AM2 repliesview on HN

> solving the ,,tests not pass'' problem by changing the tests themselves

https://github.com/oven-sh/bun/pull/30412/changes/68a34bf8ed...

This is great! Just add a random sleep(1) to a test, don't worry about it, it's going to be fine!


Replies

onlitoday at 10:47 AM

On the other hand, the sleep fits better to the test description, "should allow reading stdout after a few milliseconds". Even if 1 != 'a few'. It's possible the part of the commit reverted here, https://github.com/oven-sh/bun/commit/a42bf70139980c4d13cc55..., defeated the purpose of the test by removing the sleep. I don't think adding the sleep back is an example of AI cheating.

Strange test though either way.

robryantoday at 10:50 AM

To be fair the commit message `revert proc.exited change in spawn.test.ts` suggests the sleep was there originally.