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

@@ -31,8 +31,8 @@ describe('Custom Spy Strategies (Integration)', function() {
expect(env.createSpy('something').and.frobnicate).toBeUndefined();
});
const overallStatus = await env.execute();
expect(overallStatus).toEqual('passed');
const result = await env.execute();
expect(result.overallStatus).toEqual('passed');
});
it('allows adding more strategies local to a spec', async function() {
@@ -51,8 +51,8 @@ describe('Custom Spy Strategies (Integration)', function() {
expect(env.createSpy('something').and.frobnicate).toBeUndefined();
});
const overallStatus = await env.execute();
expect(overallStatus).toEqual('passed');
const result = await env.execute();
expect(result.overallStatus).toEqual('passed');
});
it('allows using custom strategies on a per-argument basis', async function() {
@@ -77,8 +77,8 @@ describe('Custom Spy Strategies (Integration)', function() {
expect(env.createSpy('something').and.frobnicate).toBeUndefined();
});
const overallStatus = await env.execute();
expect(overallStatus).toEqual('passed');
const result = await env.execute();
expect(result.overallStatus).toEqual('passed');
});
it('allows multiple custom strategies to be used', async function() {
@@ -112,8 +112,8 @@ describe('Custom Spy Strategies (Integration)', function() {
});
env.addReporter({ specDone: specDone });
const overallStatus = await env.execute();
expect(overallStatus).toEqual('passed');
const result = await env.execute();
expect(result.overallStatus).toEqual('passed');
expect(specDone.calls.count()).toBe(2);
});
});