diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-05-05 12:49:02 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-05-05 13:56:52 +0900 |
commit | fc8a12faa66d7a2f3c18f804c0856fb781b6e022 (patch) | |
tree | 58934f6fe2182ac9c0c851b37e64eef9d51bf85c | |
parent | b11a098d7cd298c0869a8cf21981c1aa5d4dbb10 (diff) |
global expect
33 files changed, 4 insertions, 31 deletions
diff --git a/karma.conf.js b/karma.conf.js index 46a1774..b85480f 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -6,12 +6,14 @@ module.exports = function (config) { basePath: '', frameworks: ['mocha'], files: [ + 'test/main.js', 'test/**/*.test.js', 'test/**/*.test.jsx', 'test/**/*.html' ], preprocessors: { + 'test/main.js': [ 'webpack' ], 'test/**/*.test.js': [ 'webpack' ], 'test/**/*.test.jsx': [ 'webpack' ], 'test/**/*.html': ['html2js'] diff --git a/test/background/actions/find.test.js b/test/background/actions/find.test.js index 467604f..6b0b846 100644 --- a/test/background/actions/find.test.js +++ b/test/background/actions/find.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import actions from 'background/actions'; import * as findActions from 'background/actions/find'; diff --git a/test/background/reducers/find.test.js b/test/background/reducers/find.test.js index 707d73a..c366223 100644 --- a/test/background/reducers/find.test.js +++ b/test/background/reducers/find.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import actions from 'background/actions'; import findReducer from 'background/reducers/find'; diff --git a/test/background/reducers/setting.test.js b/test/background/reducers/setting.test.js index 8df5abe..24d02ea 100644 --- a/test/background/reducers/setting.test.js +++ b/test/background/reducers/setting.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import actions from 'background/actions'; import settingReducer from 'background/reducers/setting'; diff --git a/test/console/actions/console.test.js b/test/console/actions/console.test.js index 1774431..77855cd 100644 --- a/test/console/actions/console.test.js +++ b/test/console/actions/console.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import actions from 'console/actions'; import * as consoleActions from 'console/actions/console'; diff --git a/test/console/reducers/console.test.js b/test/console/reducers/console.test.js index d196011..db40088 100644 --- a/test/console/reducers/console.test.js +++ b/test/console/reducers/console.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import actions from 'console/actions'; import reducer from 'console/reducers'; diff --git a/test/content/actions/addon.test.js b/test/content/actions/addon.test.js index 7f244dc..5f96372 100644 --- a/test/content/actions/addon.test.js +++ b/test/content/actions/addon.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import actions from 'content/actions'; import * as addonActions from 'content/actions/addon'; diff --git a/test/content/actions/follow-controller.test.js b/test/content/actions/follow-controller.test.js index 298abf2..718a90a 100644 --- a/test/content/actions/follow-controller.test.js +++ b/test/content/actions/follow-controller.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import actions from 'content/actions'; import * as followControllerActions from 'content/actions/follow-controller'; diff --git a/test/content/actions/input.test.js b/test/content/actions/input.test.js index 30705d2..fe9db5f 100644 --- a/test/content/actions/input.test.js +++ b/test/content/actions/input.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import actions from 'content/actions'; import * as inputActions from 'content/actions/input'; diff --git a/test/content/actions/setting.test.js b/test/content/actions/setting.test.js index 3112b2d..10f6807 100644 --- a/test/content/actions/setting.test.js +++ b/test/content/actions/setting.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import actions from 'content/actions'; import * as settingActions from 'content/actions/setting'; diff --git a/test/content/components/common/follow.test.js b/test/content/components/common/follow.test.js index 1fc935e..4fc11d0 100644 --- a/test/content/components/common/follow.test.js +++ b/test/content/components/common/follow.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import FollowComponent from 'content/components/common/follow'; describe('FollowComponent', () => { diff --git a/test/content/components/common/hint.test.js b/test/content/components/common/hint.test.js index ced2fde..42d571f 100644 --- a/test/content/components/common/hint.test.js +++ b/test/content/components/common/hint.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import Hint from 'content/components/common/hint'; describe('Hint class', () => { diff --git a/test/content/components/common/input.test.js b/test/content/components/common/input.test.js index a346cf6..2ba5507 100644 --- a/test/content/components/common/input.test.js +++ b/test/content/components/common/input.test.js @@ -1,5 +1,4 @@ import InputComponent from 'content/components/common/input'; -import { expect } from "chai"; describe('InputComponent', () => { it('register callbacks', () => { diff --git a/test/content/hint-key-producer.test.js b/test/content/hint-key-producer.test.js index b2171ba..dcf477d 100644 --- a/test/content/hint-key-producer.test.js +++ b/test/content/hint-key-producer.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import HintKeyProducer from 'content/hint-key-producer'; describe('HintKeyProducer class', () => { diff --git a/test/content/navigates.test.js b/test/content/navigates.test.js index f1f0741..1d73344 100644 --- a/test/content/navigates.test.js +++ b/test/content/navigates.test.js @@ -1,4 +1,3 @@ -import { expect } from 'chai'; import * as navigates from 'content/navigates'; const testRel = (done, rel, html) => { diff --git a/test/content/reducers/addon.test.js b/test/content/reducers/addon.test.js index 93f97e8..8c546d2 100644 --- a/test/content/reducers/addon.test.js +++ b/test/content/reducers/addon.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import actions from 'content/actions'; import addonReducer from 'content/reducers/addon'; diff --git a/test/content/reducers/find.test.js b/test/content/reducers/find.test.js index 908b01b..a8c30d7 100644 --- a/test/content/reducers/find.test.js +++ b/test/content/reducers/find.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import actions from 'content/actions'; import findReducer from 'content/reducers/find'; diff --git a/test/content/reducers/follow-controller.test.js b/test/content/reducers/follow-controller.test.js index f4b91d2..8a4c2d4 100644 --- a/test/content/reducers/follow-controller.test.js +++ b/test/content/reducers/follow-controller.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import actions from 'content/actions'; import followControllerReducer from 'content/reducers/follow-controller'; diff --git a/test/content/reducers/input.test.js b/test/content/reducers/input.test.js index d0b5655..0011943 100644 --- a/test/content/reducers/input.test.js +++ b/test/content/reducers/input.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import actions from 'content/actions'; import inputReducer from 'content/reducers/input'; diff --git a/test/content/reducers/setting.test.js b/test/content/reducers/setting.test.js index 634b299..4e4c095 100644 --- a/test/content/reducers/setting.test.js +++ b/test/content/reducers/setting.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import actions from 'content/actions'; import settingReducer from 'content/reducers/setting'; diff --git a/test/main.js b/test/main.js new file mode 100644 index 0000000..d923aaa --- /dev/null +++ b/test/main.js @@ -0,0 +1,2 @@ +import chai from 'chai'; +global.expect = chai.expect; diff --git a/test/settings/components/form/blacklist-form.test.jsx b/test/settings/components/form/blacklist-form.test.jsx index 95f5cde..1c46943 100644 --- a/test/settings/components/form/blacklist-form.test.jsx +++ b/test/settings/components/form/blacklist-form.test.jsx @@ -1,4 +1,3 @@ -import { expect } from 'chai'; import { h, render } from 'preact'; import BlacklistForm from 'settings/components/form/blacklist-form' diff --git a/test/settings/components/form/keymaps-form.test.jsx b/test/settings/components/form/keymaps-form.test.jsx index e9f9359..55edf8c 100644 --- a/test/settings/components/form/keymaps-form.test.jsx +++ b/test/settings/components/form/keymaps-form.test.jsx @@ -1,4 +1,3 @@ -import { expect } from 'chai'; import { h, render } from 'preact'; import KeymapsForm from 'settings/components/form/keymaps-form' diff --git a/test/settings/components/form/properties-form.test.jsx b/test/settings/components/form/properties-form.test.jsx index 4807361..0efe382 100644 --- a/test/settings/components/form/properties-form.test.jsx +++ b/test/settings/components/form/properties-form.test.jsx @@ -1,4 +1,3 @@ -import { expect } from 'chai'; import { h, render } from 'preact'; import PropertiesForm from 'settings/components/form/properties-form' diff --git a/test/settings/components/form/search-engine-form.test.jsx b/test/settings/components/form/search-engine-form.test.jsx index 9600cae..c52419d 100644 --- a/test/settings/components/form/search-engine-form.test.jsx +++ b/test/settings/components/form/search-engine-form.test.jsx @@ -1,4 +1,3 @@ -import { expect } from 'chai'; import { h, render } from 'preact'; import SearchForm from 'settings/components/form/search-form' diff --git a/test/settings/components/ui/input.test.jsx b/test/settings/components/ui/input.test.jsx index 98f2cef..0711bba 100644 --- a/test/settings/components/ui/input.test.jsx +++ b/test/settings/components/ui/input.test.jsx @@ -1,4 +1,3 @@ -import { expect } from 'chai'; import { h, render } from 'preact'; import Input from 'settings/components/ui/input' diff --git a/test/settings/reducers/setting.test.js b/test/settings/reducers/setting.test.js index 3468d4b..b9579cf 100644 --- a/test/settings/reducers/setting.test.js +++ b/test/settings/reducers/setting.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import actions from 'settings/actions'; import settingReducer from 'settings/reducers/setting'; diff --git a/test/shared/commands/parsers.test.js b/test/shared/commands/parsers.test.js index 0a1960c..1910f07 100644 --- a/test/shared/commands/parsers.test.js +++ b/test/shared/commands/parsers.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import * as parsers from 'shared/commands/parsers'; describe("shared/commands/parsers", () => { diff --git a/test/shared/settings/validator.test.js b/test/shared/settings/validator.test.js index 61d976a..9bbfa3e 100644 --- a/test/shared/settings/validator.test.js +++ b/test/shared/settings/validator.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import { validate } from 'shared/settings/validator'; describe("setting validator", () => { diff --git a/test/shared/settings/values.test.js b/test/shared/settings/values.test.js index 62cfb5f..c72824d 100644 --- a/test/shared/settings/values.test.js +++ b/test/shared/settings/values.test.js @@ -1,4 +1,3 @@ -import { expect } from 'chai'; import * as values from 'shared/settings/values'; describe("settings values", () => { diff --git a/test/shared/store/index.test.js b/test/shared/store/index.test.js index 133033b..5b69b40 100644 --- a/test/shared/store/index.test.js +++ b/test/shared/store/index.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import { createStore } from 'shared/store'; describe("Store class", () => { diff --git a/test/shared/utils/keys.test.js b/test/shared/utils/keys.test.js index 5ca8b54..770b530 100644 --- a/test/shared/utils/keys.test.js +++ b/test/shared/utils/keys.test.js @@ -1,4 +1,3 @@ -import { expect } from 'chai'; import * as keys from 'shared/utils/keys'; describe("keys util", () => { diff --git a/test/shared/utils/re.test.js b/test/shared/utils/re.test.js index 9ed6521..d12ceb7 100644 --- a/test/shared/utils/re.test.js +++ b/test/shared/utils/re.test.js @@ -1,4 +1,3 @@ -import { expect } from 'chai'; import * as re from 'shared/utils/re'; describe("re util", () => { |