diff --git a/dom/observable/tentative/observable-first.any.js b/dom/observable/tentative/observable-first.any.js index d4738d7478b1ea..826f11a8d2b796 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"); @@ -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 () => { 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");