Testing Batman.TestCase上的安装、运行测试和拆卸失败
我正试着站起来跑步。Qunit和测试运行良好,但当我使用该示例时:Testing Batman.TestCase上的安装、运行测试和拆卸失败,testing,batman.js,Testing,Batman.js,我正试着站起来跑步。Qunit和测试运行良好,但当我使用该示例时: class SimpleTest extends Batman.TestCase @test 'A simple test', -> @assert true test = new SimpleTest test.runTests() 当我浏览到localhost:3000/qunit时,我会收到以下消息: 安装程序在简单测试中失败:undefined不是函数 死于test.Batman.TestCase.
class SimpleTest extends Batman.TestCase
@test 'A simple test', ->
@assert true
test = new SimpleTest
test.runTests()
当我浏览到localhost:3000/qunit时,我会收到以下消息:
我做错了什么?根据这些
.coffee
源文件的加载方式,它们可能没有先加载依赖项
你可以试试这个:
- 从下载0.16版本
- 使用版本中预编译的
batman.testing.js
- 确保QUnit首先加载
,然后加载batman.js
。(batman.testing.js
必须在加载Batman.Object
之前定义)Batman.TestCase