空DalekJS测试用例失败并出现错误

时间:2015-05-28 05:58:34

标签: dalekjs

我正在尝试使用DalekJS编写我的第一个测试用例,但它仍然出现错误:

Running tests
Running Browser: PhantomJS
OS: windows 7 32bit
Browser Version: 1.9.8
>> WARNING: done() not called before timeout!

RUNNING TEST - "_uid"
* 0 Assertions run
* TEST - "_uid" SUCCEEDED

0/0 assertions passed. Elapsed Time: 11.34 sec

我刚从dalekjs网页上复制粘贴了这个例子:

module.export = {
    'Page title is correct': function (test) {
      test
        .open('http://google.com')
        .assert.title().is('Google', 'It has title')
        .done();
    }

};

我甚至尝试过空测试功能,但错误是一样的。

dalek -v prits out:

DalekJS CLI Tools Version: 0.0.5
DalekJS  local install: 0.0.9
Brought to you with love by: Sebastian Golasch (@asciidisco) 2013
Usage: dalek [test files] {OPTIONS}
Options:
  --version, -v   Shows the version of the dalek-cli & local dalek installation

  --reporter, -r  Reporter(s) you would like to invoke
  --driver, -d    Driver(s) you would like to invoke
  --browser, -b   Browser(s) you would like to invoke
  --viewport      Viewport dimensions you would like to invoke
  --baseUrl, -u   Base URL to append all .open()'s with if relative path is
                  given
  --logLevel, -l  Log level, controls the amount of information outputted to
                  the console (0 to 5)
  --remote        Starts a dalek host server for clients to connect to
  --nocolors      Disable colorized output in the console
  --nosymbols     Disable UTF-8 symbols in the console
  --help, -h      Show this message

任何帮助都是适当的。

希蒙

1 个答案:

答案 0 :(得分:0)

我现在可以回答我的问题。我在第一行module.export而不是module.exports中输入了一个拼写错误。

很抱歉打扰你这个愚蠢的问题。

但仍然 - 可能是打印的根本原因(类似于'导出'未定义)而不是在超时之前未调用的#);&#39 ;? :)