ReferenceError:运行 Jasmine 时未定义 goog

Bru*_*ues 5 javascript unit-testing jasmine

我尝试通过命令行使用 Jasmine 框架执行shaka-player源代码中的测试。但我收到此错误消息:

/Documents/shaka-player/spec/mpd_spec.js:19
goog.require('shaka.dash.mpd');
^
ReferenceError: goog is not defined
    at Object.<anonymous> (/Documents/shaka-player/spec/mpd_spec.js:19:1)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at /usr/lib/node_modules/jasmine/lib/jasmine.js:63:5
    at Array.forEach (native)
    at Jasmine.loadSpecs (/usr/lib/node_modules/jasmine/lib/jasmine.js:62:18)
Run Code Online (Sandbox Code Playgroud)

我配置了 jasmine.json 文件,放置了 unit_tests.html 文件在浏览器中执行测试所需的相同输入。我还编译了整个源代码,执行了 build/build.sh 脚本,并将编译后的代码放在输入列表中。jasmine.json 文件是这样的:

{
"spec_dir": "spec",
"spec_files": [
    "mpd_spec.js",
    "util.js"
],
"inputs": [
    "shaka-player.compiled.js",
    "third_party/jasmine/lib/jasmine-2.1.3/jasmine.js",
    "third_party/jasmine/lib/jasmine-2.1.3/jasmine-html.js",
    "third_party/jasmine/lib/jasmine-2.1.3/boot.js",
    "third_party/jasmine/lib/jasmine-ajax-3.1.0/mock-ajax.js",
    "third_party/blanket_jasmine/blanket_jasmine.js",
    "third_party/closure/goog/base.js"
   ]
}
Run Code Online (Sandbox Code Playgroud)

我使用 JASMINE_CONFIG_PATH 执行了 jasmine,如下:

jasmine JASMINE_CONFIG_PATH=spec/support/jasmine.json
Run Code Online (Sandbox Code Playgroud)

我做错了什么?

提前致谢。