A test result.
On JVM and Native, this resolves to Unit, representing the fact that tests are run in a blocking manner on these platforms: a call to a function returning a TestResult will simply execute the test inside it.
On JS, this is a
Promise, which reflects the fact that the test-running function does not wait for a test to finish. The JS test frameworks typically support returning
Promisefrom a test and will correctly handle it.
Because of the behavior on JS, extra care must be taken when writing multiplatform tests to avoid losing test errors:
Don't do anything after running the functions returning a TestResult. On JS, this code will execute before the test finishes.
Don't nest functions returning a TestResult.