mirror of
https://github.com/Shopify/draggable.git
synced 2025-12-08 20:15:56 +00:00
Restructure tests
This commit is contained in:
parent
ca8cd69d26
commit
85b231bc42
12
.eslintrc.js
12
.eslintrc.js
@ -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,
|
||||
},
|
||||
};
|
||||
|
||||
@ -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"]
|
||||
}
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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>
|
||||
@ -1,6 +1,7 @@
|
||||
import Swappable from 'swappable';
|
||||
import {createSandbox, triggerEvent} from 'helper';
|
||||
|
||||
import Swappable from './..';
|
||||
|
||||
const sampleMarkup = `
|
||||
<ul>
|
||||
<li>First item</li>
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
module.exports = {
|
||||
globals: {
|
||||
jest: false,
|
||||
afterAll: false,
|
||||
afterEach: false,
|
||||
beforeAll: false,
|
||||
beforeEach: false,
|
||||
describe: false,
|
||||
test: false,
|
||||
expect: false,
|
||||
},
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user