Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

fix timeout error occuring in test #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

rachael-oregan
Copy link
Contributor

Motivation

Running npm test throws the following error:

1)  test express app listen is called:
     Error: timeout of 2000ms exceeded. Ensure the done() callback is being called in this test.
      at Context.exports.test express app listen is called (test/unit/test_application.js:82:10)

Result

Remove the return to ensure that the done() callback is being called.

@@ -79,7 +79,7 @@ exports['test express app listen is called'] = function(done) {
runApp();

mock.verify();
return done();
done();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the return should not make a difference here as long as done is called.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It only passes for me when return is removed?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants