Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #383. Refactored test suite to use bower_components so we catch thes... #384

Merged
merged 2 commits into from Sep 9, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
@@ -1,2 +1,3 @@
node_modules
test/report
bower_components
10 changes: 5 additions & 5 deletions Gruntfile.coffee
Expand Up @@ -16,7 +16,7 @@ module.exports = ->

test:
files:
src: ["test/*.js"]
src: ["test/spec/*.js", "test/util/*.js"]
options:
maxlen: false
globals:
Expand Down Expand Up @@ -51,15 +51,15 @@ module.exports = ->
lcovReport: "test/report"
linesThresholdPct: 85

files: ["test/index.html", "!test/node.js"]
files: ["test/index.html"]

nodequnit:
files: ["test/*.js", "!test/dom.js"]
files: ["test/spec/*.js", "!test/spec/dom.js"]

options:
deps: ["test/vendor/util.js"]
deps: ["test/util/util.js"]
code: "."
testsDir: "test/"
testsDir: "test/spec/"

benchmark:
options:
Expand Down
2 changes: 1 addition & 1 deletion backbone.layoutmanager.js
Expand Up @@ -789,7 +789,7 @@ var LayoutManager = Backbone.View.extend({

// Ensure view events are properly copied over.
viewOptions = _.pick(options, aConcat.call(["events", "sections"],
_.values(options.events)));
_.values(options.events || {})));

// Merge the View options into the View.
_.extend(view, viewOptions);
Expand Down
6 changes: 4 additions & 2 deletions bower.json
Expand Up @@ -4,7 +4,9 @@
"main": "backbone.layoutmanager.js",
"dependencies": {
"jquery": ">=1.6",
"underscore": "~1.5",
"backbone": "~1.0"
"underscore": ">=1.5",
"backbone": "~1.0",
"qunit": "~1.12.0",
"requirejs": "~2.1.8"
}
}
11 changes: 6 additions & 5 deletions package.json
Expand Up @@ -13,10 +13,10 @@
"node": ">=0.8"
},
"dependencies": {
"backbone": "~1.0",
"backbone": ">=1.0",
"underscore.deferred": "~0.4",
"cheerio": "~0.12.2",
"underscore": "~1.5.1"
"underscore": ">=1.5"
},
"devDependencies": {
"grunt": "~0.4.1",
Expand All @@ -27,14 +27,15 @@
"grunt-qunit-istanbul": "~0.1.3",
"grunt-nodequnit": "~0.2.0",
"grunt-benchmark": "~0.2.0",
"coveralls": "~2.2.0"
"coveralls": "~2.2.0",
"bower": "~1.2.6"
},
"scripts": {
"test": "grunt && cat test/report/lcov.info | coveralls"
"test": "bower install && grunt && cat test/report/lcov.info | coveralls"
},
"jam": {
"dependencies": {
"underscore": "~1.4",
"underscore": ">=1.5",
"backbone": "~1.0",
"jquery": ">=1.6"
},
Expand Down
28 changes: 16 additions & 12 deletions test/index.html
Expand Up @@ -3,21 +3,25 @@
<head>
<meta charset="UTF-8" />
<title>backbone.layoutmanager Test Suite</title>
<link rel="stylesheet" href="qunit/qunit.css">
<script src="qunit/qunit.js"></script>
<script src="vendor/util.js"></script>
<script src="vendor/jquery.js"></script>
<script src="vendor/underscore.js"></script>
<script src="vendor/backbone.js"></script>

<!-- Bower components -->
<link rel="stylesheet" href="../bower_components/qunit/qunit/qunit.css">
<script src="../bower_components/qunit/qunit/qunit.js"></script>
<script src="../bower_components/jquery/jquery.js"></script>
<script src="../bower_components/underscore/underscore.js"></script>
<script src="../bower_components/backbone/backbone.js"></script>
<script src="../backbone.layoutmanager.js"></script>
<script src="vendor/require.js"></script>
<script src="../bower_components/requirejs/require.js"></script>

<!-- Util scripts -->
<script src="util/util.js"></script>

<!-- Test scripts -->
<script src="expose.js"></script>
<script src="configure.js"></script>
<script src="setup.js"></script>
<script src="views.js"></script>
<script src="dom.js"></script>
<script src="spec/expose.js"></script>
<script src="spec/configure.js"></script>
<script src="spec/setup.js"></script>
<script src="spec/views.js"></script>
<script src="spec/dom.js"></script>

<script type="text/template" id="dom-template">
This template lives in the <b>DOM</b>
Expand Down
226 changes: 0 additions & 226 deletions test/qunit/qunit.css

This file was deleted.