diff --git a/package.json b/package.json index c686e99e..ee65dbea 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "start": "rimraf ./tmp/streaming && babel ./streaming/index.js --out-dir ./tmp && node ./tmp/streaming/index.js", "storybook": "NODE_ENV=test start-storybook -p 9001 -c storybook", "test": "npm run test:lint && npm run test:mocha", - "test:lint": "eslint -c .eslintrc.yml --ext=js app/javascript/ config/webpack/ storyboard/ streaming/", - "test:mocha": "NODE_ENV=test mocha --require ./spec/javascript/setup.js --compilers js:babel-register ./spec/javascript/components/*.test.jsx", + "test:lint": "eslint -c .eslintrc.yml --ext=js app/javascript/ config/webpack/ spec/javascript/ storyboard/ streaming/", + "test:mocha": "NODE_ENV=test mocha --require ./spec/javascript/setup.js --compilers js:babel-register ./spec/javascript/components/*.test.js", "postinstall": "npm rebuild node-sass" }, "repository": { @@ -116,8 +116,8 @@ "devDependencies": { "@kadira/storybook": "^2.35.3", "babel-eslint": "^7.2.3", - "chai": "^3.5.0", - "chai-enzyme": "^0.6.1", + "chai": "^4.0.1", + "chai-enzyme": "^0.7.1", "enzyme": "^2.8.2", "eslint": "^3.19.0", "eslint-plugin-jsx-a11y": "^4.0.0", @@ -127,7 +127,7 @@ "mocha": "^3.4.1", "react-intl-translations-manager": "^5.0.0", "react-test-renderer": "^15.5.4", - "sinon": "^2.2.0", + "sinon": "^2.3.2", "webpack-dev-server": "^2.4.5" }, "optionalDependencies": { diff --git a/spec/javascript/components/avatar.test.jsx b/spec/javascript/components/avatar.test.js similarity index 94% rename from spec/javascript/components/avatar.test.jsx rename to spec/javascript/components/avatar.test.js index f7017388..03b71dc9 100644 --- a/spec/javascript/components/avatar.test.jsx +++ b/spec/javascript/components/avatar.test.js @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { render } from 'enzyme'; - -import Avatar from '../../../app/javascript/mastodon/components/avatar' +import React from 'react'; +import Avatar from '../../../app/javascript/mastodon/components/avatar'; describe('', () => { const src = '/path/to/image.jpg'; diff --git a/spec/javascript/components/button.test.jsx b/spec/javascript/components/button.test.js similarity index 98% rename from spec/javascript/components/button.test.jsx rename to spec/javascript/components/button.test.js index e08671c0..9cf8b1ee 100644 --- a/spec/javascript/components/button.test.jsx +++ b/spec/javascript/components/button.test.js @@ -1,7 +1,7 @@ import { expect } from 'chai'; import { shallow } from 'enzyme'; import sinon from 'sinon'; - +import React from 'react'; import Button from '../../../app/javascript/mastodon/components/button'; describe('