Fixed pending() for async/promise-returning specs
Fixes #1449. Fixes #1450.
This commit is contained in:
@@ -1485,6 +1485,7 @@ describe("Env integration", function() {
|
||||
reporter.jasmineDone.and.callFake(function() {
|
||||
var specStatus = reporter.specDone.calls.argsFor(0)[0];
|
||||
|
||||
expect(specStatus.status).toBe('pending');
|
||||
expect(specStatus.pendingReason).toBe('with a message');
|
||||
|
||||
done();
|
||||
@@ -1499,6 +1500,34 @@ describe("Env integration", function() {
|
||||
env.execute();
|
||||
});
|
||||
|
||||
it('should report pending spec messages from async functions', function(done) {
|
||||
jasmine.getEnv().requireAsyncAwait();
|
||||
|
||||
var env = new jasmineUnderTest.Env(),
|
||||
reporter = jasmine.createSpyObj('fakeReporter', [
|
||||
'specDone',
|
||||
'jasmineDone'
|
||||
]);
|
||||
|
||||
reporter.jasmineDone.and.callFake(function() {
|
||||
var specStatus = reporter.specDone.calls.argsFor(0)[0];
|
||||
|
||||
expect(specStatus.status).toBe('pending');
|
||||
expect(specStatus.pendingReason).toBe('with a message');
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
env.addReporter(reporter);
|
||||
|
||||
env.it('will be pending', async function() {
|
||||
debugger;
|
||||
env.pending('with a message');
|
||||
});
|
||||
|
||||
env.execute();
|
||||
});
|
||||
|
||||
it('should report using fallback reporter', function(done) {
|
||||
var env = new jasmineUnderTest.Env(),
|
||||
reporter = jasmine.createSpyObj('fakeReporter', [
|
||||
|
||||
Reference in New Issue
Block a user