Fixed failing specs
This commit is contained in:
@@ -1500,8 +1500,18 @@ describe("Env integration", function() {
|
|||||||
env.execute();
|
env.execute();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should report pending spec messages from async functions', function(done) {
|
it('should report pending spec messages from promise-returning functions', function(done) {
|
||||||
jasmine.getEnv().requireAsyncAwait();
|
function StubPromise(fn) {
|
||||||
|
try {
|
||||||
|
fn();
|
||||||
|
} catch (e) {
|
||||||
|
this.exception = e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
StubPromise.prototype.then = function(resolve, reject) {
|
||||||
|
reject(this.exception);
|
||||||
|
};
|
||||||
|
|
||||||
var env = new jasmineUnderTest.Env(),
|
var env = new jasmineUnderTest.Env(),
|
||||||
reporter = jasmine.createSpyObj('fakeReporter', [
|
reporter = jasmine.createSpyObj('fakeReporter', [
|
||||||
@@ -1520,9 +1530,10 @@ describe("Env integration", function() {
|
|||||||
|
|
||||||
env.addReporter(reporter);
|
env.addReporter(reporter);
|
||||||
|
|
||||||
env.it('will be pending', async function() {
|
env.it('will be pending', function() {
|
||||||
debugger;
|
return new StubPromise(function() {
|
||||||
env.pending('with a message');
|
env.pending('with a message');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
env.execute();
|
env.execute();
|
||||||
|
|||||||
Reference in New Issue
Block a user