Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
async test returning resolved promise with truthy value is treated as an error #308
In this test script, the first test returns a resolved promise (indicating an async test) with an undefined value, and the test succeeds correctly.
The second test also returns a resolved promise, but this time with a defined value. Since the promise is resolved (successful), and there are no failed assertions, the test should be treated as successful. However, buster treats it as a failing test with an error.
For illustration I'm resolving with an object that has a "message" key (which is displayed as if buster is printing out error.message), but any truthy value will cause the test to fail.