1
0
Fork 0
firefox/testing/web-platform/tests/scheduler/post-task-result-throws.any.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

9 lines
391 B
JavaScript

// META: title=Scheduler: postTask Error Propagation
// META: global=window,worker
'use strict';
promise_test(t => {
const testError = new Error('Failed');
const task = scheduler.postTask(() => { throw testError; });
return promise_rejects_exactly(t, testError, task, 'postTask should propagate the error');
}, 'Test postTask rejects the associated promise with the callback error');