dalek: "WARNING: done not called!" masking real errors

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();
  }
}

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 16 (6 by maintainers)

Commits related to this issue

Most upvoted comments

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