ReferenceError: Can't find variable: affix
我正在尝试运行 Jasmine 规范,但无法affix
从jasmine-fixture
. 我的规范没有使用 a require
,但我没有看到任何需要它的参考资料。
更麻烦的是,我的文章中没有任何提及affix
或jasmine
与此相关的内容,vendor.js
因为它只是一个 devDependency,所以我不确定它如何适用于 karma runner/jasmine 规范。
bower.json:
{
"name": "af-calendar",
"version": "0.0.1",
"main": "public/js/app.js",
"ignore": [
"**/.*",
"node_modules",
"bower_components"
],
"dependencies": {
"moment": ">=2.5.1",
"moment-range": "alienfast/moment-range#3454882ae8e0493b20ff1c6651956b906c8f975d",
"jquery": ">=1.10.2",
"jquery-ui": ">=1.10.3",
"jquery-simulate": "*"
},
"devDependencies": {
"jasmine-jquery": ">=2.0.3",
"jasmine-fixture": ">=1.2.0"
},
"overrides": {
"jquery-simulate": {
"main": "jquery.simulate.js",
"dependencies": {
"jquery": "*"
}
}
}
}
早午餐-config.coffee
exports.config =
files:
javascripts:
joinTo:
'js/vendor.js': /^(bower_components|vendor)/
'js/app.js': /^app/
# pluginHelpers: 'js/app.js'
stylesheets:
joinTo:
'css/vendor.css': /^(vendor|bower_components)/
'css/app.css': /^app/
# templates:
# joinTo: 'js/app.js'
plugins:
autoReload:
enabled:
js: on
css: on
assets: off
imageoptimizer:
path: 'images'
smushit: no
coffeelint:
pattern: /^app\/.*\.coffee$/
options:
# indentation:
# value: 4
# level: "warn"
#
max_line_length:
level: "ignore"
conventions:
assets: /(assets|vendor\/assets|font)/
问题
我不想运送它们或将它们包含在 vendor.js 中。我如何仅在我的业力/茉莉花规格测试中包含/要求它们?