post-task-result-throws.any.js (391B)
1 // META: title=Scheduler: postTask Error Propagation 2 // META: global=window,worker 3 'use strict'; 4 5 promise_test(t => { 6 const testError = new Error('Failed'); 7 const task = scheduler.postTask(() => { throw testError; }); 8 return promise_rejects_exactly(t, testError, task, 'postTask should propagate the error'); 9 }, 'Test postTask rejects the associated promise with the callback error');