diff --git a/.babelrc b/.babelrc index 437e7719f..4c3af2d60 100644 --- a/.babelrc +++ b/.babelrc @@ -26,10 +26,12 @@ ] }, "test": { - "presets": [ "es2015-node4", "flow"], + "presets": [ "es2015-node4", "es2015", "flow", "react"], "plugins": [ "transform-class-properties", - "transform-object-rest-spread" + "transform-object-rest-spread", + "transform-class-properties", + "syntax-async-functions" ] }, "registry": { diff --git a/jest.config.js b/jest.config.js index 741571854..71f15ca6f 100644 --- a/jest.config.js +++ b/jest.config.js @@ -17,6 +17,13 @@ module.exports = { 'global.js' ], 'moduleNameMapper': { - '\\.(scss)$': '/node_modules/jest-css-modules' - } + '\\.(scss)$': '/node_modules/identity-obj-proxy', + 'github-markdown-css': '/node_modules/identity-obj-proxy', + '\\.(png)$': '/node_modules/identity-obj-proxy', + 'api': '/test/webui/components/__mocks__/api.js', + 'storage': '/test/webui/components/__mocks__/storage.js', + }, + 'transformIgnorePatterns': [ + '/node_modules/(?!react-syntax-highlighter)' + ] }; diff --git a/package.json b/package.json index 117eecf86..5bc753160 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,7 @@ "babel-jest": "^21.2.0", "babel-loader": "7.1.2", "babel-plugin-flow-runtime": "0.15.0", + "babel-plugin-syntax-async-functions": "^6.13.0", "babel-plugin-transform-async-to-generator": "^6.24.1", "babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-decorators-legacy": "1.3.4", @@ -72,7 +73,6 @@ "babel-register": "^6.26.0", "babel-runtime": "6.26.0", "codecov": "2.2.0", - "coveralls": "2.13.1", "cross-env": "5.1.1", "css-loader": "0.28.7", "element-react": "1.4.3", @@ -95,6 +95,7 @@ "fs-extra": "4.0.2", "github-markdown-css": "2.9.0", "html-webpack-plugin": "2.30.1", + "identity-obj-proxy": "^3.0.0", "in-publish": "2.0.0", "jest": "^21.2.1", "jest-css-modules": "^1.1.0", diff --git a/src/webui/src/components/Header/index.js b/src/webui/src/components/Header/index.js index dccc9a9f3..cf20434e9 100644 --- a/src/webui/src/components/Header/index.js +++ b/src/webui/src/components/Header/index.js @@ -26,6 +26,7 @@ export default class Header extends React.Component { super(props); this.toggleLoginModal = this.toggleLoginModal.bind(this); this.handleSubmit = this.handleSubmit.bind(this); + this.handleInput = this.handleInput.bind(this); } toggleLoginModal() { @@ -169,9 +170,9 @@ export default class Header extends React.Component { }
- +

- +