Restructure tests

This commit is contained in:
Max Hoffmann 2017-10-06 11:14:39 -04:00
parent ca8cd69d26
commit 85b231bc42
No known key found for this signature in database
GPG Key ID: 1DFA4D13DD27A676
8 changed files with 21 additions and 25 deletions

View File

@ -9,5 +9,15 @@ module.exports = {
rules: {
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': 'off',
}
},
globals: {
jest: false,
afterAll: false,
afterEach: false,
beforeAll: false,
beforeEach: false,
describe: false,
test: false,
expect: false,
},
};

View File

@ -1,13 +1,10 @@
{
"testMatch": [
"<rootDir>/test/src/**/*.test.js",
"<rootDir>/src/**/*.test.js"
],
"setupFiles": ["<rootDir>/test/setup.js"],
"testMatch": ["<rootDir>/src/**/*.test.js"],
"setupFiles": ["<rootDir>/scripts/test/setup.js"],
"transform": {".*": "<rootDir>/node_modules/babel-jest"},
"moduleFileExtensions": ["js"],
"collectCoverageFrom": [
"src/**/*.js"
],
"moduleDirectories": ["node_modules", "src", "test"]
"moduleDirectories": ["node_modules", "src", "scripts/test"]
}

View File

@ -1,11 +1,11 @@
import Draggable from 'draggable';
import {DragStartEvent} from 'events/drag-event';
import {
createSandbox,
triggerEvent,
} from 'helper';
import Draggable from './..';
import {DragStartEvent} from './../../events/drag-event';
const sampleMarkup = `
<ul>
<li>First item</li>

View File

@ -1,5 +1,3 @@
import MouseSensor from 'sensors/mouse-sensor';
import {
createSandbox,
triggerEvent,
@ -9,6 +7,8 @@ import {
getLastSensorEventByType,
} from 'helper';
import MouseSensor from './..';
const sampleMarkup = `
<ul>
<li>First item</li>

View File

@ -1,6 +1,7 @@
import Swappable from 'swappable';
import {createSandbox, triggerEvent} from 'helper';
import Swappable from './..';
const sampleMarkup = `
<ul>
<li>First item</li>

View File

@ -1,12 +0,0 @@
module.exports = {
globals: {
jest: false,
afterAll: false,
afterEach: false,
beforeAll: false,
beforeEach: false,
describe: false,
test: false,
expect: false,
},
};