couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From benk...@apache.org
Subject fauxton commit: updated refs/heads/master to a84deac
Date Tue, 15 Sep 2015 21:56:10 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master f1a20274b -> a84deac1d


Specifying correct params for before/afterEach

The NW docs say the done() callback is the second param, not first.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/a84deac1
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/a84deac1
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/a84deac1

Branch: refs/heads/master
Commit: a84deac1d2b7aaf51d770b0b088e3140b0572231
Parents: f1a2027
Author: Ben Keen <ben.keen@gmail.com>
Authored: Mon Sep 14 08:01:53 2015 -0700
Committer: Ben Keen <ben.keen@gmail.com>
Committed: Tue Sep 15 12:42:56 2015 -0700

----------------------------------------------------------------------
 test/nightwatch_tests/helpers/helpers.js | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/a84deac1/test/nightwatch_tests/helpers/helpers.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/helpers/helpers.js b/test/nightwatch_tests/helpers/helpers.js
index 5d36d20..b7f94db 100644
--- a/test/nightwatch_tests/helpers/helpers.js
+++ b/test/nightwatch_tests/helpers/helpers.js
@@ -20,14 +20,16 @@ module.exports = {
   getNanoInstance: function () {
     return nano(this.test_settings.db_url);
   },
-  beforeEach: function (done) {
+
+  beforeEach: function (browser, done) {
     var nano = module.exports.getNanoInstance(),
         database = module.exports.testDatabaseName;
 
-    console.log("nano setting up database");
-    // clean up the database we created previously
+    console.log('nano setting up database');
 
+    // clean up the database we created previously
     nano.db.destroy(database, function (err, body, header) {
+
       if (err && err.message !== 'Database does not exist.' && err.message
!== 'missing') {
         console.log('Error in setting up ' + database, err.message);
       }
@@ -41,7 +43,7 @@ module.exports = {
     });
   },
 
-  afterEach: function (done) {
+  afterEach: function (browser, done) {
     var nano = module.exports.getNanoInstance(),
         database = module.exports.testDatabaseName;
 


Mime
View raw message