diff --git a/.eslintrc b/.eslintrc index 796e238a1..4312d7156 100644 --- a/.eslintrc +++ b/.eslintrc @@ -17,6 +17,12 @@ env: browser: true commonjs: true es6: true + +overrides: + files: "*.test.js" + env: + mocha: true + extends: - eslint:recommended - plugin:react/recommended diff --git a/componentTestSetup.js b/componentTestSetup.js new file mode 100644 index 000000000..b328984b1 --- /dev/null +++ b/componentTestSetup.js @@ -0,0 +1,15 @@ +import Enzyme from 'enzyme' +import Adapter from 'enzyme-adapter-react-16' +import chai from 'chai' +import sinonChai from 'sinon-chai' + +chai.use(sinonChai) +Enzyme.configure({ adapter: new Adapter() }) + +// Setup Intl in "en" and "fr" for testing +// var areIntlLocalesSupported = require('intl-locales-supported') + +// var localesMyAppSupports = ['en', 'fr'] +global.Intl = require('intl') +require('intl/locale-data/jsonp/en.js') +require('intl/locale-data/jsonp/fr.js') diff --git a/index.html b/index.html index 3d83ebe29..1a276a0d1 100644 --- a/index.html +++ b/index.html @@ -1,21 +1,24 @@ -
- - - - -