Skip to content

Commit

Permalink
Attempting to setup qunit bower etc for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
andreassolberg committed Dec 22, 2014
1 parent 9e2d378 commit 52fe059
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
language: node_js
node_js:
- 0.10
before_script:
- node_modules/bower/bin/bower install
8 changes: 6 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,19 @@ module.exports = function(grunt) {
module: true
}
}
}
},
qunit: {
files: ['test/index.html']
}
});


// grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-requirejs');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-qunit');

grunt.registerTask('test', ['requirejs', 'jshint']);
grunt.registerTask('test', ['requirejs', 'jshint', 'qunit']);
grunt.registerTask('default', ['requirejs', 'jshint']);


Expand Down
9 changes: 4 additions & 5 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@
"tests"
],
"devDependencies": {
"almond": "~0.2.9"
},
"dependencies": {

}
"almond": "~0.2.9",
"qunit": "~1.16.0"
},
"dependencies": {}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"grunt": "~0.4.5",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-nodeunit": "~0.4.1",
"grunt-requirejs": "*"
"grunt-requirejs": "*",
"grunt-contrib-qunit": "*"
},
"author": "Andreas Åkre Solberg",
"license": "Simplified BSD Licence http://opensource.org/licenses/BSD-2-Clause",
Expand Down
14 changes: 14 additions & 0 deletions test/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JSO Test (QUnit)</title>
<link rel="stylesheet" href="//code.jquery.com/qunit/qunit-1.16.0.css">
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script src="//code.jquery.com/qunit/qunit-1.16.0.js"></script>
<script src="tests.js"></script>
</body>
</html>
3 changes: 3 additions & 0 deletions test/tests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
QUnit.test( "hello test", function( assert ) {
assert.ok( 1 == "1", "Passed!" );
});

0 comments on commit 52fe059

Please sign in to comment.