From 526b21c5a300ce35d33e088fd025ce9c815e7d14 Mon Sep 17 00:00:00 2001 From: Marais Rossouw Date: Mon, 21 Oct 2024 09:54:15 +1000 Subject: [PATCH 1/2] chore: complete rejection messages are not normative --- dom/observable/tentative/observable-first.any.js | 2 +- dom/observable/tentative/observable-last.any.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dom/observable/tentative/observable-first.any.js b/dom/observable/tentative/observable-first.any.js index d4738d7478b1ea..dd35b549f287cd 100644 --- a/dom/observable/tentative/observable-first.any.js +++ b/dom/observable/tentative/observable-first.any.js @@ -49,7 +49,7 @@ promise_test(async () => { assert_true(rejection instanceof RangeError, "Upon complete(), first() Promise rejects with RangeError"); - assert_equals(rejection.message, "No values in Observable"); + assert_true(typeof rejection.message === "string", "Rejection message must be a string"); }, "first(): Promise rejects with RangeError when source Observable " + "completes without emitting any values"); diff --git a/dom/observable/tentative/observable-last.any.js b/dom/observable/tentative/observable-last.any.js index 064a781cada985..994cc8e8f6782d 100644 --- a/dom/observable/tentative/observable-last.any.js +++ b/dom/observable/tentative/observable-last.any.js @@ -42,7 +42,7 @@ promise_test(async () => { assert_true(rejection instanceof RangeError, "Promise rejects with RangeError"); - assert_equals(rejection.message, "No values in Observable"); + assert_true(typeof rejection.message === "string", "Rejection message must be a string"); }, "last(): Promise rejects with RangeError when source Observable " + "completes without emitting any values"); From 111231d913b3ef14b705bbd1e2b2a16953f30130 Mon Sep 17 00:00:00 2001 From: Marais Rossouw Date: Mon, 21 Oct 2024 09:54:32 +1000 Subject: [PATCH 2/2] chore: AbortError messages are not normative --- dom/observable/tentative/observable-first.any.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom/observable/tentative/observable-first.any.js b/dom/observable/tentative/observable-first.any.js index dd35b549f287cd..826f11a8d2b796 100644 --- a/dom/observable/tentative/observable-first.any.js +++ b/dom/observable/tentative/observable-first.any.js @@ -72,7 +72,7 @@ promise_test(async () => { "Promise rejects with a DOMException for abortion"); assert_equals(rejection.name, "AbortError", "Rejected with 'AbortError' DOMException"); - assert_equals(rejection.message, "signal is aborted without reason"); + assert_true(typeof rejection.message === "string", "Rejection message must be a string"); }, "first(): Aborting a signal rejects the Promise with an AbortError DOMException"); promise_test(async () => {