summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Branca <chewbranca@gmail.com>2013-06-17 17:27:21 -0700
committerRussell Branca <chewbranca@gmail.com>2013-06-17 17:27:21 -0700
commitd2ff6d21e92bb8b8e562b89fe4cc2bbd83c8b627 (patch)
tree2ccf23309490a70f968c2f1af8a08bd85845b160
parentcbbd7d56b52a44937adb35678aa4a0b200334399 (diff)
downloadcouchdb-fauxton-jasmine.tar.gz
Experiments with Jasmine testingfauxton-jasmine
-rw-r--r--src/fauxton/Gruntfile.js14
-rw-r--r--src/fauxton/package.json4
-rw-r--r--src/fauxton/test/jasmine/spec/example.js2
3 files changed, 17 insertions, 3 deletions
diff --git a/src/fauxton/Gruntfile.js b/src/fauxton/Gruntfile.js
index b76ae24e8..6d5ce8835 100644
--- a/src/fauxton/Gruntfile.js
+++ b/src/fauxton/Gruntfile.js
@@ -238,8 +238,18 @@ module.exports = function(grunt) {
// The headless Jasmine testing is provided by grunt-jasmine-task. Simply
// point the configuration to your test directory.
+ // jasmine: {
+ // all: ["test/jasmine/*.html"]
+ //},
+
jasmine: {
- all: ["test/jasmine/*.html"]
+ fauxton: {
+ //src: 'app/**/*.js',
+ options: {
+ specs: 'test/jasmine/spec/*.js'
+ //helpers: 'spec/*Helper.js'
+ }
+ }
},
// Copy build artifacts and library code into the distribution
@@ -311,6 +321,8 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify');
// Load CSSMin task
grunt.loadNpmTasks('grunt-contrib-cssmin');
+ // Load Jasmine task
+ grunt.loadNpmTasks('grunt-contrib-jasmine');
/*
* Default task
diff --git a/src/fauxton/package.json b/src/fauxton/package.json
index 5b6367502..1f914c2f1 100644
--- a/src/fauxton/package.json
+++ b/src/fauxton/package.json
@@ -25,7 +25,9 @@
"express": "~3.0.6",
"http-proxy": "~0.10.2"
},
- "devDependencies": {},
+ "devDependencies": {
+ "grunt-contrib-jasmine": "~0.5.0"
+ },
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
diff --git a/src/fauxton/test/jasmine/spec/example.js b/src/fauxton/test/jasmine/spec/example.js
index bbba3e838..f56f6e9ca 100644
--- a/src/fauxton/test/jasmine/spec/example.js
+++ b/src/fauxton/test/jasmine/spec/example.js
@@ -68,6 +68,6 @@ describe("async", function() {
semaphore--;
}, 500);
- waitsFor(function() { return semaphore === 0 });
+ waitsFor(function() { return semaphore === 0; });
});
});