global expect
This commit is contained in:
parent
b11a098d7c
commit
fc8a12faa6
33 changed files with 4 additions and 31 deletions
|
@ -6,12 +6,14 @@ module.exports = function (config) {
|
||||||
basePath: '',
|
basePath: '',
|
||||||
frameworks: ['mocha'],
|
frameworks: ['mocha'],
|
||||||
files: [
|
files: [
|
||||||
|
'test/main.js',
|
||||||
'test/**/*.test.js',
|
'test/**/*.test.js',
|
||||||
'test/**/*.test.jsx',
|
'test/**/*.test.jsx',
|
||||||
'test/**/*.html'
|
'test/**/*.html'
|
||||||
],
|
],
|
||||||
|
|
||||||
preprocessors: {
|
preprocessors: {
|
||||||
|
'test/main.js': [ 'webpack' ],
|
||||||
'test/**/*.test.js': [ 'webpack' ],
|
'test/**/*.test.js': [ 'webpack' ],
|
||||||
'test/**/*.test.jsx': [ 'webpack' ],
|
'test/**/*.test.jsx': [ 'webpack' ],
|
||||||
'test/**/*.html': ['html2js']
|
'test/**/*.html': ['html2js']
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from "chai";
|
|
||||||
import actions from 'background/actions';
|
import actions from 'background/actions';
|
||||||
import * as findActions from 'background/actions/find';
|
import * as findActions from 'background/actions/find';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from "chai";
|
|
||||||
import actions from 'background/actions';
|
import actions from 'background/actions';
|
||||||
import findReducer from 'background/reducers/find';
|
import findReducer from 'background/reducers/find';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from "chai";
|
|
||||||
import actions from 'background/actions';
|
import actions from 'background/actions';
|
||||||
import settingReducer from 'background/reducers/setting';
|
import settingReducer from 'background/reducers/setting';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from "chai";
|
|
||||||
import actions from 'console/actions';
|
import actions from 'console/actions';
|
||||||
import * as consoleActions from 'console/actions/console';
|
import * as consoleActions from 'console/actions/console';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from "chai";
|
|
||||||
import actions from 'console/actions';
|
import actions from 'console/actions';
|
||||||
import reducer from 'console/reducers';
|
import reducer from 'console/reducers';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from "chai";
|
|
||||||
import actions from 'content/actions';
|
import actions from 'content/actions';
|
||||||
import * as addonActions from 'content/actions/addon';
|
import * as addonActions from 'content/actions/addon';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from "chai";
|
|
||||||
import actions from 'content/actions';
|
import actions from 'content/actions';
|
||||||
import * as followControllerActions from 'content/actions/follow-controller';
|
import * as followControllerActions from 'content/actions/follow-controller';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from "chai";
|
|
||||||
import actions from 'content/actions';
|
import actions from 'content/actions';
|
||||||
import * as inputActions from 'content/actions/input';
|
import * as inputActions from 'content/actions/input';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from "chai";
|
|
||||||
import actions from 'content/actions';
|
import actions from 'content/actions';
|
||||||
import * as settingActions from 'content/actions/setting';
|
import * as settingActions from 'content/actions/setting';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from "chai";
|
|
||||||
import FollowComponent from 'content/components/common/follow';
|
import FollowComponent from 'content/components/common/follow';
|
||||||
|
|
||||||
describe('FollowComponent', () => {
|
describe('FollowComponent', () => {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from "chai";
|
|
||||||
import Hint from 'content/components/common/hint';
|
import Hint from 'content/components/common/hint';
|
||||||
|
|
||||||
describe('Hint class', () => {
|
describe('Hint class', () => {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import InputComponent from 'content/components/common/input';
|
import InputComponent from 'content/components/common/input';
|
||||||
import { expect } from "chai";
|
|
||||||
|
|
||||||
describe('InputComponent', () => {
|
describe('InputComponent', () => {
|
||||||
it('register callbacks', () => {
|
it('register callbacks', () => {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from "chai";
|
|
||||||
import HintKeyProducer from 'content/hint-key-producer';
|
import HintKeyProducer from 'content/hint-key-producer';
|
||||||
|
|
||||||
describe('HintKeyProducer class', () => {
|
describe('HintKeyProducer class', () => {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from 'chai';
|
|
||||||
import * as navigates from 'content/navigates';
|
import * as navigates from 'content/navigates';
|
||||||
|
|
||||||
const testRel = (done, rel, html) => {
|
const testRel = (done, rel, html) => {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from "chai";
|
|
||||||
import actions from 'content/actions';
|
import actions from 'content/actions';
|
||||||
import addonReducer from 'content/reducers/addon';
|
import addonReducer from 'content/reducers/addon';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from "chai";
|
|
||||||
import actions from 'content/actions';
|
import actions from 'content/actions';
|
||||||
import findReducer from 'content/reducers/find';
|
import findReducer from 'content/reducers/find';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from "chai";
|
|
||||||
import actions from 'content/actions';
|
import actions from 'content/actions';
|
||||||
import followControllerReducer from 'content/reducers/follow-controller';
|
import followControllerReducer from 'content/reducers/follow-controller';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from "chai";
|
|
||||||
import actions from 'content/actions';
|
import actions from 'content/actions';
|
||||||
import inputReducer from 'content/reducers/input';
|
import inputReducer from 'content/reducers/input';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from "chai";
|
|
||||||
import actions from 'content/actions';
|
import actions from 'content/actions';
|
||||||
import settingReducer from 'content/reducers/setting';
|
import settingReducer from 'content/reducers/setting';
|
||||||
|
|
||||||
|
|
2
test/main.js
Normal file
2
test/main.js
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
import chai from 'chai';
|
||||||
|
global.expect = chai.expect;
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from 'chai';
|
|
||||||
import { h, render } from 'preact';
|
import { h, render } from 'preact';
|
||||||
import BlacklistForm from 'settings/components/form/blacklist-form'
|
import BlacklistForm from 'settings/components/form/blacklist-form'
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from 'chai';
|
|
||||||
import { h, render } from 'preact';
|
import { h, render } from 'preact';
|
||||||
import KeymapsForm from 'settings/components/form/keymaps-form'
|
import KeymapsForm from 'settings/components/form/keymaps-form'
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from 'chai';
|
|
||||||
import { h, render } from 'preact';
|
import { h, render } from 'preact';
|
||||||
import PropertiesForm from 'settings/components/form/properties-form'
|
import PropertiesForm from 'settings/components/form/properties-form'
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from 'chai';
|
|
||||||
import { h, render } from 'preact';
|
import { h, render } from 'preact';
|
||||||
import SearchForm from 'settings/components/form/search-form'
|
import SearchForm from 'settings/components/form/search-form'
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from 'chai';
|
|
||||||
import { h, render } from 'preact';
|
import { h, render } from 'preact';
|
||||||
import Input from 'settings/components/ui/input'
|
import Input from 'settings/components/ui/input'
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from "chai";
|
|
||||||
import actions from 'settings/actions';
|
import actions from 'settings/actions';
|
||||||
import settingReducer from 'settings/reducers/setting';
|
import settingReducer from 'settings/reducers/setting';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from "chai";
|
|
||||||
import * as parsers from 'shared/commands/parsers';
|
import * as parsers from 'shared/commands/parsers';
|
||||||
|
|
||||||
describe("shared/commands/parsers", () => {
|
describe("shared/commands/parsers", () => {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from "chai";
|
|
||||||
import { validate } from 'shared/settings/validator';
|
import { validate } from 'shared/settings/validator';
|
||||||
|
|
||||||
describe("setting validator", () => {
|
describe("setting validator", () => {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from 'chai';
|
|
||||||
import * as values from 'shared/settings/values';
|
import * as values from 'shared/settings/values';
|
||||||
|
|
||||||
describe("settings values", () => {
|
describe("settings values", () => {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from "chai";
|
|
||||||
import { createStore } from 'shared/store';
|
import { createStore } from 'shared/store';
|
||||||
|
|
||||||
describe("Store class", () => {
|
describe("Store class", () => {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from 'chai';
|
|
||||||
import * as keys from 'shared/utils/keys';
|
import * as keys from 'shared/utils/keys';
|
||||||
|
|
||||||
describe("keys util", () => {
|
describe("keys util", () => {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { expect } from 'chai';
|
|
||||||
import * as re from 'shared/utils/re';
|
import * as re from 'shared/utils/re';
|
||||||
|
|
||||||
describe("re util", () => {
|
describe("re util", () => {
|
||||||
|
|
Reference in a new issue