question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"WARNING: done not called!" masking real errors

See original GitHub issue

I’m not getting error messages / stack traces of problems my tests may have. Instead I’m presented with the utterly useless (and easy to miss) message “WARNING: done not called!”.

I need to see what I did wrong here. Tests need to halt. This is a JavaScript error. I tried to invoke a function that doesn’t exist. My test is flawed - stop and yell!

{
  foo: function(test) {
    test
      // Note that this should be .assert.doesntExist()
      .doesntExist('.selector')
      // this isn't called
      .done();
  }
}

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
sarahfittjecommented, Mar 17, 2015

Also having the same issue as @bowsersenior.

I’m using the following versions: DalekJS CLI Tools Version: 0.0.5 DalekJS local install: 0.0.9

Syntax errors do not entail an error in command line - see the mistake .assert.text.to.contain('#i_am_a_textbox', 'TEXT') in the code block below. After changing this syntax mistake to .assert.text('#i_am_a_textbox').to.contain('TEXT'), a real error did show up in console.

  • Test Code:
module.exports = {
    'Dalek test': function (test) {
        test
            .open('http://www.dalekjs.com/guineapig/')
            .type('#i_am_a_textbox', 'TEXT')
            .assert.text.to.contain('#i_am_a_textbox', 'TEXT')
            .done();
    }
};
  • Command Line Output:
$ dalek tests/dalekTest.js -b phantomjs
Running tests
Running Browser: PhantomJS
OS: linux unknown 64bit
Browser Version: 1.9.8
>> WARNING: done() not called before timeout!

RUNNING TEST - "Dalek test"
▶ OPEN http://www.dalekjs.com/guineapig/
▶ TYPE #i_am_a_textbox
✔ 0 Assertions run
✔ TEST - "Dalek test" SUCCEEDED
0reactions
herlon214commented, Aug 9, 2016

@SarahPAV , I solved this error by checking the correct commands. In my case I typed “screenshot” wrong so it never continues the flow until the .done()

I holpe it helps you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Errors when using imgaug's augmentation. #2018 - GitHub
The solution is to ignore the warning and double-check if the augmentation method works for the masks.
Read more >
Error handling - Apollo GraphQL Docs
Masking and logging errors. You can edit Apollo Server error details before they're passed to a client or reported to Apollo Studio. This...
Read more >
The following objects are masked... - RStudio Community
The following objects are masked from 'package:base': intersect, setdiff, setequal, union). that is my error how to solve it , i will try...
Read more >
PHP unlink() handling the exception - Stack Overflow
The proper way to do this is check that the file exists before trying to call unlink on it. If you are merely...
Read more >
restore_error_handler does not restore previous errors mask
If I set 2 error handlers with differents masks, and trying to restore back my first handler by calling restore_error_handler(), ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found