From 5f2d9a4a220307b1111c91dfac74951ef3925457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 16 Apr 2022 19:51:12 +0200 Subject: feat(test): use structured data for JavaScript errors in tests (#14287) This commit rewrites test runner to send structured error data from JavaScript to Rust instead of passing strings. This will allow to customize display of errors in test report (which will be addressed in follow up commits). --- cli/tests/testdata/compat/test_runner/cjs.out | 4 +++- cli/tests/testdata/compat/test_runner/esm.out | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'cli/tests/testdata/compat') diff --git a/cli/tests/testdata/compat/test_runner/cjs.out b/cli/tests/testdata/compat/test_runner/cjs.out index 02d86891b..722721166 100644 --- a/cli/tests/testdata/compat/test_runner/cjs.out +++ b/cli/tests/testdata/compat/test_runner/cjs.out @@ -5,7 +5,7 @@ Failed assertion ... FAILED ([WILDCARD]) failures: compat/test_runner/cjs.js > Failed assertion -AssertionError [ERR_ASSERTION]: Values are not strictly equal: +AssertionError: Values are not strictly equal: [Diff] Actual / Expected @@ -14,6 +14,8 @@ AssertionError [ERR_ASSERTION]: Values are not strictly equal: - 10 + 20 + Error.captureStackTrace(this, stackStartFn || stackStartFunction); + ^ [WILDCARD] failures: diff --git a/cli/tests/testdata/compat/test_runner/esm.out b/cli/tests/testdata/compat/test_runner/esm.out index 73cfe7826..f135c993d 100644 --- a/cli/tests/testdata/compat/test_runner/esm.out +++ b/cli/tests/testdata/compat/test_runner/esm.out @@ -5,7 +5,7 @@ Failed assertion ... FAILED ([WILDCARD]) failures: compat/test_runner/esm.mjs > Failed assertion -AssertionError [ERR_ASSERTION]: Values are not strictly equal: +AssertionError: Values are not strictly equal: [Diff] Actual / Expected @@ -14,6 +14,8 @@ AssertionError [ERR_ASSERTION]: Values are not strictly equal: - 10 + 20 + Error.captureStackTrace(this, stackStartFn || stackStartFunction); + ^ [WILDCARD] failures: -- cgit v1.2.3