You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2017/02/02 12:51:31 UTC

fauxton commit: updated refs/heads/master to b7d7b4a

Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 28c402ff3 -> b7d7b4af9


use the fetch mock library


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

Branch: refs/heads/master
Commit: b7d7b4af9b3c2311cf120c36a992c102615d9277
Parents: 28c402f
Author: Garren Smith <ga...@gmail.com>
Authored: Thu Feb 2 14:22:23 2017 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Thu Feb 2 14:22:23 2017 +0200

----------------------------------------------------------------------
 app/addons/permissions/__tests__/container-test.js | 6 +++---
 jest-config.json                                   | 2 +-
 jest-setup.js                                      | 2 +-
 package.json                                       | 6 +++---
 4 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/b7d7b4af/app/addons/permissions/__tests__/container-test.js
----------------------------------------------------------------------
diff --git a/app/addons/permissions/__tests__/container-test.js b/app/addons/permissions/__tests__/container-test.js
index 82ae677..c96b08a 100644
--- a/app/addons/permissions/__tests__/container-test.js
+++ b/app/addons/permissions/__tests__/container-test.js
@@ -23,13 +23,13 @@ import { Provider } from 'react-redux';
 import reducer from '../reducers';
 import PermissionsContainer from '../container/PermissionsContainer';
 
+var fetchMock = require('fetch-mock');
+
 describe('Permissions Container', () => {
 
   it('renders with new results', () => {
 
-    fetch.mockResponse(
-      JSON.stringify({})
-    );
+    fetchMock.once("*", {});
 
     const middlewares = [thunk];
     const store = createStore(

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/b7d7b4af/jest-config.json
----------------------------------------------------------------------
diff --git a/jest-config.json b/jest-config.json
index e818216..417dddb 100644
--- a/jest-config.json
+++ b/jest-config.json
@@ -1,7 +1,7 @@
 {
   "testPathDirs": ["app"],
 
-  "setupTestFrameworkScriptFile": "jest-setup.js",
+  "setupTestFrameworkScriptFile": "./jest-setup.js",
 
   "moduleNameMapper": {
     "underscore": "lodash",

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/b7d7b4af/jest-setup.js
----------------------------------------------------------------------
diff --git a/jest-setup.js b/jest-setup.js
index 69906b1..5b28e77 100644
--- a/jest-setup.js
+++ b/jest-setup.js
@@ -11,10 +11,10 @@
 // the License.
 
 require('jest');
+require('whatwg-fetch');
 
 window.$ = window.jQuery = require('jquery');
 window._ = require('lodash');
 window.Backbone = require('backbone');
 
-global.fetch = require('jest-fetch-mock');
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/b7d7b4af/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 59c152b..bf0b792 100644
--- a/package.json
+++ b/package.json
@@ -20,8 +20,8 @@
     "bootstrap": "^3.3.7",
     "enzyme": "^2.4.1",
     "es5-shim": "4.5.4",
-    "jest": "^17.0.3",
-    "jest-fetch-mock": "^1.0.6",
+    "fetch-mock": "^5.9.3",
+    "jest": "^18.1.0",
     "mocha": "~3.1.2",
     "mocha-loader": "^1.0.0",
     "mocha-phantomjs": "git+https://github.com/garrensmith/mocha-phantomjs.git",
@@ -107,7 +107,7 @@
     "visualizeRevTree": "git+https://github.com/neojski/visualizeRevTree.git#gh-pages",
     "webpack": "^1.12.12",
     "webpack-dev-server": "^1.14.1",
-    "whatwg-fetch": "^2.0.1"
+    "whatwg-fetch": "~2.0.1"
   },
   "scripts": {
     "stylecheck": "eslint --ext=js,jsx .",