Updated async timeout message

There are now multiple ways to do async functions, and callbacks
are probably the least common in new code, so the message should
be more general rather than referring to callbacks.
This commit is contained in:
Steve Gravrock
2019-08-03 08:25:57 -07:00
parent c100bb6242
commit 18195a868c
3 changed files with 8 additions and 8 deletions

View File

@@ -6106,7 +6106,7 @@ getJasmineRequireObj().QueueRunner = function(j$) {
var timeoutInterval = queueableFn.timeout || j$.DEFAULT_TIMEOUT_INTERVAL;
timeoutId = self.setTimeout(function() {
var error = new Error(
'Timeout - Async callback was not invoked within ' +
'Timeout - Async function did not complete within ' +
timeoutInterval +
'ms ' +
(queueableFn.timeout

View File

@@ -1106,17 +1106,17 @@ describe("Env integration", function() {
env.execute();
});
it('should wait a custom interval before reporting async functions that fail to call done', function(done) {
it('should wait a custom interval before reporting async functions that fail to complete', function(done) {
var env = createMockedEnv(),
reporter = jasmine.createSpyObj('fakeReport', ['jasmineDone', 'suiteDone', 'specDone']);
reporter.jasmineDone.and.callFake(function(r) {
expect(r.failedExpectations).toEqual([]);
expect(reporter.suiteDone).toHaveFailedExpectationsForRunnable('suite beforeAll', [ /^Error: Timeout - Async callback was not invoked within 5000ms \(custom timeout\)/ ]);
expect(reporter.suiteDone).toHaveFailedExpectationsForRunnable('suite afterAll', [ /^Error: Timeout - Async callback was not invoked within 2000ms \(custom timeout\)/ ]);
expect(reporter.specDone).toHaveFailedExpectationsForRunnable('suite beforeEach times out', [/^Error: Timeout - Async callback was not invoked within 1000ms \(custom timeout\)/]);
expect(reporter.specDone).toHaveFailedExpectationsForRunnable('suite afterEach times out', [ /^Error: Timeout - Async callback was not invoked within 4000ms \(custom timeout\)/ ]);
expect(reporter.specDone).toHaveFailedExpectationsForRunnable('suite it times out', [ /^Error: Timeout - Async callback was not invoked within 6000ms \(custom timeout\)/ ]);
expect(reporter.suiteDone).toHaveFailedExpectationsForRunnable('suite beforeAll', [ /^Error: Timeout - Async function did not complete within 5000ms \(custom timeout\)/ ]);
expect(reporter.suiteDone).toHaveFailedExpectationsForRunnable('suite afterAll', [ /^Error: Timeout - Async function did not complete within 2000ms \(custom timeout\)/ ]);
expect(reporter.specDone).toHaveFailedExpectationsForRunnable('suite beforeEach times out', [/^Error: Timeout - Async function did not complete within 1000ms \(custom timeout\)/]);
expect(reporter.specDone).toHaveFailedExpectationsForRunnable('suite afterEach times out', [ /^Error: Timeout - Async function did not complete within 4000ms \(custom timeout\)/ ]);
expect(reporter.specDone).toHaveFailedExpectationsForRunnable('suite it times out', [ /^Error: Timeout - Async function did not complete within 6000ms \(custom timeout\)/ ]);
jasmine.clock().tick(1);
realSetTimeout(done);

View File

@@ -131,7 +131,7 @@ getJasmineRequireObj().QueueRunner = function(j$) {
var timeoutInterval = queueableFn.timeout || j$.DEFAULT_TIMEOUT_INTERVAL;
timeoutId = self.setTimeout(function() {
var error = new Error(
'Timeout - Async callback was not invoked within ' +
'Timeout - Async function did not complete within ' +
timeoutInterval +
'ms ' +
(queueableFn.timeout