Resolve the execute() promise to the entire JasmineDoneInfo

This matches jasmine-npm.
This commit is contained in:
Steve Gravrock
2021-12-09 18:18:36 -08:00
parent b37d989f13
commit f1cf6ee419
5 changed files with 47 additions and 44 deletions

View File

@@ -3229,14 +3229,21 @@ describe('Env integration', function() {
});
});
it('is resolved to the overall status', function() {
it('is resolved to the value of the jasmineDone event', async function() {
env.describe('suite', function() {
env.it('spec', function() {
env.expect(true).toBe(false);
});
});
return expectAsync(env.execute(null)).toBeResolvedTo('failed');
let event;
env.addReporter({
jasmineDone: e => (event = e)
});
const result = await env.execute();
expect(event.overallStatus).toEqual('failed');
expect(result).toEqual(event);
});
});