Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rejection normative message assertions #48717

Merged
merged 2 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dom/observable/tentative/observable-first.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -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 () => {
Expand Down
2 changes: 1 addition & 1 deletion dom/observable/tentative/observable-last.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down