1
每當我嘗試運行我的單元測試(用buster編寫並執行用戶buster test
)幷包含jQuery(因爲我的庫依賴於它)。我得到以下錯誤:Buster.js jQuery依賴錯誤:未定義窗口
./test/deps/jquery-1.7.2.min.js: window is not defined
這是我的buster.js配置文件: 無功配置= module.exports;
config["GitJs Tests"] = {
rootPath: "../",
environment: "node",
sources: [
"src/Gitjs.js"
],
deps: [
"test/deps/*.js" // Jquery is in here
],
tests: [
"test/test_constructor.js"
]
};
爲什麼我得到這個錯誤,我該如何解決?