Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Timeout of Xms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. #96

Open
icontreras-pit opened this issue Nov 25, 2018 · 2 comments
Labels

Comments

@icontreras-pit
Copy link

Hi guys, I need help please. I am trying to do a simple test with timeout of 30000ms, but I don't know why throw this error: Error: Timeout of 30000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

describe('describe 1', function () {
    it('test 1', function (done) {
        expect(200).to.be.equal(200);
        done;
    }).timeout(30000);    
});

Thanks!

@lsshawn
Copy link

lsshawn commented Nov 14, 2019

Make sure you have v1.10.0 minimum.

Then you can use the --timeout option. E.g. sls invoke test --timeout 10000 for 10000ms.

@KariHe
Copy link
Contributor

KariHe commented Nov 25, 2019

describe('describe 1', function () {
    it('test 1', function (done) {
        expect(200).to.be.equal(200);
        done;
    }).timeout(30000);    
});

Replace done; with done();. You need to call the function.

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

No branches or pull requests

3 participants