feat: allow for dynamic hints (#44279)

This commit is contained in:
Oliver Eyton-Williams
2021-11-25 16:10:01 +01:00
committed by GitHub
parent 63f6d9d3f2
commit 260f945de8
3 changed files with 18 additions and 5 deletions

View File

@@ -167,7 +167,11 @@ function* executeTests(testRunner, tests, testTimeout = 5000) {
throw err;
}
} catch (err) {
newTest.message = text;
const { actual, expected } = err;
newTest.message = text
.replace('--fcc-expected--', expected)
.replace('--fcc-actual--', actual);
if (err === 'timeout') {
newTest.err = 'Test timed out';
newTest.message = `${newTest.message} (${newTest.err})`;