couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowal...@apache.org
Subject [1/2] fauxton commit: updated refs/heads/master to ae5070b
Date Wed, 30 Nov 2016 17:31:52 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 14224ea7e -> ae5070b43


tests: port helperSpec to jest

our first jest based tests :)

PR: #815
PR-URL: https://github.com/apache/couchdb-fauxton/pull/815
Reviewed-By: garren smith <garren.smith@gmail.com>


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

Branch: refs/heads/master
Commit: ae5070b4338d05d15e30688f7b6bbc94bab20327
Parents: de6f434
Author: Robert Kowalski <robertkowalski@apache.org>
Authored: Tue Nov 29 18:31:05 2016 +0100
Committer: Robert Kowalski <robertkowalski@apache.org>
Committed: Wed Nov 30 18:31:37 2016 +0100

----------------------------------------------------------------------
 .../replication/__tests__/helpers-tests.js      | 34 ++++++++++++++++
 app/addons/replication/tests/helpersSpec.js     | 41 --------------------
 2 files changed, 34 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/ae5070b4/app/addons/replication/__tests__/helpers-tests.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/__tests__/helpers-tests.js b/app/addons/replication/__tests__/helpers-tests.js
new file mode 100644
index 0000000..0703f39
--- /dev/null
+++ b/app/addons/replication/__tests__/helpers-tests.js
@@ -0,0 +1,34 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+import helpers from '../helpers';
+
+describe('Replication Helpers - getDatabaseLabel', () => {
+
+  it('returns database name for string', () => {
+    const db = 'http://tester:testerpass@127.0.0.1/fancy/db/name';
+
+    const res = helpers.getDatabaseLabel(db);
+
+    expect(res).toBe('fancy/db/name');
+  });
+
+  it('returns database name for object', () => {
+    const db = {
+      url: 'http://tester:testerpass@127.0.0.1/fancy'
+    };
+
+    const res = helpers.getDatabaseLabel(db);
+    expect(res).toBe('fancy');
+  });
+
+});

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/ae5070b4/app/addons/replication/tests/helpersSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/tests/helpersSpec.js b/app/addons/replication/tests/helpersSpec.js
deleted file mode 100644
index 5e2b1c3..0000000
--- a/app/addons/replication/tests/helpersSpec.js
+++ /dev/null
@@ -1,41 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-import utils from "../../../../test/mocha/testUtils";
-import helpers from '../helpers';
-const assert = utils.assert;
-
-describe('Replication Helpers', () => {
-
-  describe('getDatabaseLabel', () => {
-
-    it('returns database name for string', () => {
-      const db = 'http://tester:testerpass@127.0.0.1/fancy/db/name';
-
-      const dbName = helpers.getDatabaseLabel(db);
-      assert.deepEqual('fancy/db/name', dbName);
-
-    });
-
-    it('returns database name for object', () => {
-      const db = {
-        url: 'http://tester:testerpass@127.0.0.1/fancy'
-      };
-
-      const dbName = helpers.getDatabaseLabel(db);
-      assert.deepEqual('fancy', dbName);
-
-    });
-
-  });
-
-});


Mime
View raw message