Breaking change: Made Env#execute async

Errors related to invalid spec order are now reported via promise
rejection rather than synchronous throw.
This commit is contained in:
Steve Gravrock
2022-08-21 16:40:03 -07:00
parent 0bfbda720d
commit 0690500a0d
4 changed files with 16 additions and 22 deletions

View File

@@ -26,11 +26,7 @@ getJasmineRequireObj().Runner = function(j$) {
];
}
// Although execute returns a promise, it isn't async for backwards
// compatibility: The "Invalid order" exception needs to be propagated
// synchronously from Env#execute.
// TODO: make this and Env#execute async in the next major release
execute(runablesToRun) {
async execute(runablesToRun) {
if (this.executedBefore_) {
this.topSuite_.reset();
}