summaryrefslogtreecommitdiff
path: root/Gruntfile.js
diff options
context:
space:
mode:
authorTrey Hunner <trey@treyhunner.com>2015-04-14 10:55:57 -0400
committerTim Graham <timograham@gmail.com>2015-06-30 21:04:16 -0400
commit2d0dead224b6448072b72b37d2fbcc8dc3afa007 (patch)
tree6dfb01a60cefc0dcf5cdcb35ac5c946a2cab98e0 /Gruntfile.js
parent3bbaf84d6533fb61ac0038f2bbe52ee0d7b4fd10 (diff)
downloaddjango-2d0dead224b6448072b72b37d2fbcc8dc3afa007.tar.gz
DEP 0003 -- Added JavaScript unit tests.
Setup QUnit, added tests, and measured test coverage. Thanks to Nick Sanford for the initial tests.
Diffstat (limited to 'Gruntfile.js')
-rw-r--r--Gruntfile.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 0000000000..9fa6826535
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+var globalThreshold = 50; // Global code coverage threshold (as a percentage)
+
+module.exports = function(grunt) {
+ grunt.initConfig({
+ // Configuration to be run (and then tested).
+ blanket_qunit: {
+ default_options: {
+ options: {
+ urls: ['js_tests/tests.html?coverage=true&gruntReport'],
+ globalThreshold: globalThreshold,
+ threshold: 10
+ }
+ }
+ }
+ });
+
+ grunt.loadNpmTasks('grunt-blanket-qunit');
+ grunt.registerTask('test', ['blanket_qunit']);
+ grunt.registerTask('default', ['test']);
+};