diff options
author | Johann-S <johann.servoire@gmail.com> | 2019-10-02 12:43:54 +0300 |
---|---|---|
committer | Johann-S <johann.servoire@gmail.com> | 2019-10-03 10:55:57 +0300 |
commit | 3d12b541c488ea09efced2fb987fcbf384c656bb (patch) | |
tree | 1863095dd8162e25a1909cf741e32faa091c32d4 /js | |
parent | 393ddae09b0578c8d381540bdbb4e68cdec1b45b (diff) |
return to the original file structure to avoid breaking modularity
Diffstat (limited to 'js')
-rw-r--r-- | js/index.esm.js | 22 | ||||
-rw-r--r-- | js/index.umd.js | 22 | ||||
-rw-r--r-- | js/src/alert.js (renamed from js/src/alert/alert.js) | 8 | ||||
-rw-r--r-- | js/src/button.js (renamed from js/src/button/button.js) | 8 | ||||
-rw-r--r-- | js/src/carousel.js (renamed from js/src/carousel/carousel.js) | 10 | ||||
-rw-r--r-- | js/src/collapse.js (renamed from js/src/collapse/collapse.js) | 10 | ||||
-rw-r--r-- | js/src/dropdown.js (renamed from js/src/dropdown/dropdown.js) | 10 | ||||
-rw-r--r-- | js/src/modal.js (renamed from js/src/modal/modal.js) | 10 | ||||
-rw-r--r-- | js/src/popover.js (renamed from js/src/popover/popover.js) | 8 | ||||
-rw-r--r-- | js/src/scrollspy.js (renamed from js/src/scrollspy/scrollspy.js) | 10 | ||||
-rw-r--r-- | js/src/tab.js (renamed from js/src/tab/tab.js) | 8 | ||||
-rw-r--r-- | js/src/toast.js (renamed from js/src/toast/toast.js) | 8 | ||||
-rw-r--r-- | js/src/tooltip.js (renamed from js/src/tooltip/tooltip.js) | 12 | ||||
-rw-r--r-- | js/tests/README.md | 6 | ||||
-rw-r--r-- | js/tests/karma.conf.js | 83 | ||||
-rw-r--r-- | js/tests/units/.eslintrc.json (renamed from js/src/.eslintrc.json) | 2 | ||||
-rw-r--r-- | js/tests/units/alert.spec.js (renamed from js/src/alert/alert.spec.js) | 6 | ||||
-rw-r--r-- | js/tests/units/button.spec.js (renamed from js/src/button/button.spec.js) | 6 | ||||
-rw-r--r-- | js/tests/units/carousel.spec.js (renamed from js/src/carousel/carousel.spec.js) | 6 | ||||
-rw-r--r-- | js/tests/units/collapse.spec.js (renamed from js/src/collapse/collapse.spec.js) | 8 | ||||
-rw-r--r-- | js/tests/units/dom/data.spec.js (renamed from js/src/dom/data.spec.js) | 4 | ||||
-rw-r--r-- | js/tests/units/dom/event-handler.spec.js (renamed from js/src/dom/event-handler.spec.js) | 4 | ||||
-rw-r--r-- | js/tests/units/dom/manipulator.spec.js (renamed from js/src/dom/manipulator.spec.js) | 4 | ||||
-rw-r--r-- | js/tests/units/dom/selector-engine.spec.js (renamed from js/src/dom/selector-engine.spec.js) | 6 | ||||
-rw-r--r-- | js/tests/units/dropdown.spec.js (renamed from js/src/dropdown/dropdown.spec.js) | 6 | ||||
-rw-r--r-- | js/tests/units/modal.spec.js (renamed from js/src/modal/modal.spec.js) | 8 | ||||
-rw-r--r-- | js/tests/units/popover.spec.js (renamed from js/src/popover/popover.spec.js) | 6 | ||||
-rw-r--r-- | js/tests/units/scrollspy.spec.js (renamed from js/src/scrollspy/scrollspy.spec.js) | 8 | ||||
-rw-r--r-- | js/tests/units/tab.spec.js (renamed from js/src/tab/tab.spec.js) | 4 | ||||
-rw-r--r-- | js/tests/units/toast.spec.js (renamed from js/src/toast/toast.spec.js) | 4 | ||||
-rw-r--r-- | js/tests/units/tooltip.spec.js (renamed from js/src/tooltip/tooltip.spec.js) | 8 | ||||
-rw-r--r-- | js/tests/units/util/index.spec.js (renamed from js/src/util/index.spec.js) | 4 | ||||
-rw-r--r-- | js/tests/units/util/sanitizer.spec.js (renamed from js/src/util/sanitizer.spec.js) | 2 |
33 files changed, 159 insertions, 172 deletions
diff --git a/js/index.esm.js b/js/index.esm.js index 18b12a454f..e49218a1e8 100644 --- a/js/index.esm.js +++ b/js/index.esm.js @@ -5,17 +5,17 @@ * -------------------------------------------------------------------------- */ -import Alert from './src/alert/alert' -import Button from './src/button/button' -import Carousel from './src/carousel/carousel' -import Collapse from './src/collapse/collapse' -import Dropdown from './src/dropdown/dropdown' -import Modal from './src/modal/modal' -import Popover from './src/popover/popover' -import ScrollSpy from './src/scrollspy/scrollspy' -import Tab from './src/tab/tab' -import Toast from './src/toast/toast' -import Tooltip from './src/tooltip/tooltip' +import Alert from './src/alert' +import Button from './src/button' +import Carousel from './src/carousel' +import Collapse from './src/collapse' +import Dropdown from './src/dropdown' +import Modal from './src/modal' +import Popover from './src/popover' +import ScrollSpy from './src/scrollspy' +import Tab from './src/tab' +import Toast from './src/toast' +import Tooltip from './src/tooltip' export { Alert, diff --git a/js/index.umd.js b/js/index.umd.js index 17657f38f8..0a1d5ac0b4 100644 --- a/js/index.umd.js +++ b/js/index.umd.js @@ -5,17 +5,17 @@ * -------------------------------------------------------------------------- */ -import Alert from './src/alert/alert' -import Button from './src/button/button' -import Carousel from './src/carousel/carousel' -import Collapse from './src/collapse/collapse' -import Dropdown from './src/dropdown/dropdown' -import Modal from './src/modal/modal' -import Popover from './src/popover/popover' -import ScrollSpy from './src/scrollspy/scrollspy' -import Tab from './src/tab/tab' -import Toast from './src/toast/toast' -import Tooltip from './src/tooltip/tooltip' +import Alert from './src/alert' +import Button from './src/button' +import Carousel from './src/carousel' +import Collapse from './src/collapse' +import Dropdown from './src/dropdown' +import Modal from './src/modal' +import Popover from './src/popover' +import ScrollSpy from './src/scrollspy' +import Tab from './src/tab' +import Toast from './src/toast' +import Tooltip from './src/tooltip' export default { Alert, diff --git a/js/src/alert/alert.js b/js/src/alert.js index 024528b816..dbd931b52e 100644 --- a/js/src/alert/alert.js +++ b/js/src/alert.js @@ -11,10 +11,10 @@ import { emulateTransitionEnd, getElementFromSelector, getTransitionDurationFromElement -} from '../util/index' -import Data from '../dom/data' -import EventHandler from '../dom/event-handler' -import SelectorEngine from '../dom/selector-engine' +} from './util/index' +import Data from './dom/data' +import EventHandler from './dom/event-handler' +import SelectorEngine from './dom/selector-engine' /** * ------------------------------------------------------------------------ diff --git a/js/src/button/button.js b/js/src/button.js index 4418ba6b87..6edd5cb64f 100644 --- a/js/src/button/button.js +++ b/js/src/button.js @@ -5,10 +5,10 @@ * -------------------------------------------------------------------------- */ -import { getjQuery } from '../util/index' -import Data from '../dom/data' -import EventHandler from '../dom/event-handler' -import SelectorEngine from '../dom/selector-engine' +import { getjQuery } from './util/index' +import Data from './dom/data' +import EventHandler from './dom/event-handler' +import SelectorEngine from './dom/selector-engine' /** * ------------------------------------------------------------------------ diff --git a/js/src/carousel/carousel.js b/js/src/carousel.js index 723bf57c66..5034f17984 100644 --- a/js/src/carousel/carousel.js +++ b/js/src/carousel.js @@ -16,11 +16,11 @@ import { reflow, triggerTransitionEnd, typeCheckConfig -} from '../util/index' -import Data from '../dom/data' -import EventHandler from '../dom/event-handler' -import Manipulator from '../dom/manipulator' -import SelectorEngine from '../dom/selector-engine' +} from './util/index' +import Data from './dom/data' +import EventHandler from './dom/event-handler' +import Manipulator from './dom/manipulator' +import SelectorEngine from './dom/selector-engine' /** * ------------------------------------------------------------------------ diff --git a/js/src/collapse/collapse.js b/js/src/collapse.js index 4de7b52822..f533885ec4 100644 --- a/js/src/collapse/collapse.js +++ b/js/src/collapse.js @@ -16,11 +16,11 @@ import { makeArray, reflow, typeCheckConfig -} from '../util/index' -import Data from '../dom/data' -import EventHandler from '../dom/event-handler' -import Manipulator from '../dom/manipulator' -import SelectorEngine from '../dom/selector-engine' +} from './util/index' +import Data from './dom/data' +import EventHandler from './dom/event-handler' +import Manipulator from './dom/manipulator' +import SelectorEngine from './dom/selector-engine' /** * ------------------------------------------------------------------------ diff --git a/js/src/dropdown/dropdown.js b/js/src/dropdown.js index b840356892..06a271ef83 100644 --- a/js/src/dropdown/dropdown.js +++ b/js/src/dropdown.js @@ -12,12 +12,12 @@ import { makeArray, noop, typeCheckConfig -} from '../util/index' -import Data from '../dom/data' -import EventHandler from '../dom/event-handler' -import Manipulator from '../dom/manipulator' +} from './util/index' +import Data from './dom/data' +import EventHandler from './dom/event-handler' +import Manipulator from './dom/manipulator' import Popper from 'popper.js' -import SelectorEngine from '../dom/selector-engine' +import SelectorEngine from './dom/selector-engine' /** * ------------------------------------------------------------------------ diff --git a/js/src/modal/modal.js b/js/src/modal.js index 4864cad9d0..bee5e23f88 100644 --- a/js/src/modal/modal.js +++ b/js/src/modal.js @@ -15,11 +15,11 @@ import { makeArray, reflow, typeCheckConfig -} from '../util/index' -import Data from '../dom/data' -import EventHandler from '../dom/event-handler' -import Manipulator from '../dom/manipulator' -import SelectorEngine from '../dom/selector-engine' +} from './util/index' +import Data from './dom/data' +import EventHandler from './dom/event-handler' +import Manipulator from './dom/manipulator' +import SelectorEngine from './dom/selector-engine' /** * ------------------------------------------------------------------------ diff --git a/js/src/popover/popover.js b/js/src/popover.js index 5da7ffe562..a633af4ba0 100644 --- a/js/src/popover/popover.js +++ b/js/src/popover.js @@ -5,10 +5,10 @@ * -------------------------------------------------------------------------- */ -import { getjQuery } from '../util/index' -import Data from '../dom/data' -import SelectorEngine from '../dom/selector-engine' -import Tooltip from '../tooltip/tooltip' +import { getjQuery } from './util/index' +import Data from './dom/data' +import SelectorEngine from './dom/selector-engine' +import Tooltip from './tooltip' /** * ------------------------------------------------------------------------ diff --git a/js/src/scrollspy/scrollspy.js b/js/src/scrollspy.js index fa52a12890..c379c62235 100644 --- a/js/src/scrollspy/scrollspy.js +++ b/js/src/scrollspy.js @@ -11,11 +11,11 @@ import { getUID, makeArray, typeCheckConfig -} from '../util/index' -import Data from '../dom/data' -import EventHandler from '../dom/event-handler' -import Manipulator from '../dom/manipulator' -import SelectorEngine from '../dom/selector-engine' +} from './util/index' +import Data from './dom/data' +import EventHandler from './dom/event-handler' +import Manipulator from './dom/manipulator' +import SelectorEngine from './dom/selector-engine' /** * ------------------------------------------------------------------------ diff --git a/js/src/tab/tab.js b/js/src/tab.js index b356cc0e2b..d9bd1fc050 100644 --- a/js/src/tab/tab.js +++ b/js/src/tab.js @@ -13,10 +13,10 @@ import { getTransitionDurationFromElement, makeArray, reflow -} from '../util/index' -import Data from '../dom/data' -import EventHandler from '../dom/event-handler' -import SelectorEngine from '../dom/selector-engine' +} from './util/index' +import Data from './dom/data' +import EventHandler from './dom/event-handler' +import SelectorEngine from './dom/selector-engine' /** * ------------------------------------------------------------------------ diff --git a/js/src/toast/toast.js b/js/src/toast.js index 4de7db1cd1..e0d2a8b3f2 100644 --- a/js/src/toast/toast.js +++ b/js/src/toast.js @@ -12,10 +12,10 @@ import { getTransitionDurationFromElement, reflow, typeCheckConfig -} from '../util/index' -import Data from '../dom/data' -import EventHandler from '../dom/event-handler' -import Manipulator from '../dom/manipulator' +} from './util/index' +import Data from './dom/data' +import EventHandler from './dom/event-handler' +import Manipulator from './dom/manipulator' /** * ------------------------------------------------------------------------ diff --git a/js/src/tooltip/tooltip.js b/js/src/tooltip.js index 99ac29af6f..b4f047b70e 100644 --- a/js/src/tooltip/tooltip.js +++ b/js/src/tooltip.js @@ -16,16 +16,16 @@ import { makeArray, noop, typeCheckConfig -} from '../util/index' +} from './util/index' import { DefaultWhitelist, sanitizeHtml -} from '../util/sanitizer' -import Data from '../dom/data' -import EventHandler from '../dom/event-handler' -import Manipulator from '../dom/manipulator' +} from './util/sanitizer' +import Data from './dom/data' +import EventHandler from './dom/event-handler' +import Manipulator from './dom/manipulator' import Popper from 'popper.js' -import SelectorEngine from '../dom/selector-engine' +import SelectorEngine from './dom/selector-engine' /** * ------------------------------------------------------------------------ diff --git a/js/tests/README.md b/js/tests/README.md index 76a582e855..dd2cc0f1b9 100644 --- a/js/tests/README.md +++ b/js/tests/README.md @@ -1,6 +1,6 @@ ## How does Bootstrap's test suite work? -Bootstrap uses [Jasmine](https://jasmine.github.io/). Each plugin has a file dedicated to its tests in `src/<plugin-name>/<plugin-name>.spec.js`. +Bootstrap uses [Jasmine](https://jasmine.github.io/). Each plugin has a file dedicated to its tests in `tests/units/<plugin-name>.spec.js`. * `visual/` contains "visual" tests which are run interactively in real browsers and require manual verification by humans. @@ -9,7 +9,7 @@ To run the unit test suite via [Karma](https://karma-runner.github.io/) and debu ## How do I add a new unit test? -1. Locate and open the file dedicated to the plugin which you need to add tests to (`src/<plugin-name>/<plugin-name>.spec.js`). +1. Locate and open the file dedicated to the plugin which you need to add tests to (`tests/units/<plugin-name>.spec.js`). 2. Review the [Jasmine API Documentation](https://jasmine.github.io/pages/docs_home.html) and use the existing tests as references for how to structure your new tests. 3. Write the necessary unit test(s) for the new or revised functionality. 4. Run `npm run js-test` to see the results of your newly-added test(s). @@ -26,7 +26,7 @@ To run the unit test suite via [Karma](https://karma-runner.github.io/) and debu ## Code coverage -Currently we're aiming for at least 90% test coverage for our code. To ensure your changes meet or exceed this limit, run `npm run js-compile && npm run js-test` and open the file in `js/coverage/lcov-report/index.html` to see the code coverage for each plugin. See more details when you select a plugin and ensure your change is fully covered by unit tests. +Currently we're aiming for at least 90% test coverage for our code. To ensure your changes meet or exceed this limit, run `npm run js-test-karma` and open the file in `js/coverage/lcov-report/index.html` to see the code coverage for each plugin. See more details when you select a plugin and ensure your change is fully covered by unit tests. ### Example tests diff --git a/js/tests/karma.conf.js b/js/tests/karma.conf.js index 06c594bceb..8e30094104 100644 --- a/js/tests/karma.conf.js +++ b/js/tests/karma.conf.js @@ -46,39 +46,6 @@ const customLaunchers = { } } -const rollupPreprocessor = { - plugins: [ - istanbul({ - exclude: ['js/src/**/*.spec.js'] - }), - babel({ - // Only transpile our source code - exclude: 'node_modules/**', - // Include only required helpers - externalHelpersWhitelist: [ - 'defineProperties', - 'createClass', - 'inheritsLoose', - 'defineProperty', - 'objectSpread2' - ], - plugins: [ - '@babel/plugin-proposal-object-rest-spread' - ] - }), - resolve() - ], - output: { - format: 'iife', - name: 'bootstrapTest', - sourcemap: 'inline' - } -} - -let files = [ - 'node_modules/hammer-simulator/index.js' -] - const conf = { basePath: '../..', port: 9876, @@ -88,6 +55,41 @@ const conf = { concurrency: Infinity, client: { clearContext: false + }, + files: [ + 'node_modules/hammer-simulator/index.js', + { pattern: 'js/tests/units/**/*.spec.js', watched: !browserStack } + ], + preprocessors: { + 'js/tests/units/**/*.spec.js': ['rollup'] + }, + rollupPreprocessor: { + plugins: [ + istanbul({ + exclude: ['js/tests/units/**/*.spec.js', 'js/tests/helpers/**/*.js'] + }), + babel({ + // Only transpile our source code + exclude: 'node_modules/**', + // Include only required helpers + externalHelpersWhitelist: [ + 'defineProperties', + 'createClass', + 'inheritsLoose', + 'defineProperty', + 'objectSpread2' + ], + plugins: [ + '@babel/plugin-proposal-object-rest-spread' + ] + }), + resolve() + ], + output: { + format: 'iife', + name: 'bootstrapTest', + sourcemap: 'inline' + } } } @@ -104,13 +106,6 @@ if (browserStack) { conf.customLaunchers = browsers conf.browsers = browsersKeys reporters.push('BrowserStack', 'kjhtml') - files = files.concat([ - { pattern: 'js/src/**/*.spec.js', watched: false } - ]) - conf.preprocessors = { - 'js/src/**/*.spec.js': ['rollup'] - } - conf.rollupPreprocessor = rollupPreprocessor } else { frameworks.push('detectBrowsers') plugins.push( @@ -119,14 +114,7 @@ if (browserStack) { 'karma-detect-browsers', 'karma-coverage-istanbul-reporter' ) - files = files.concat([ - { pattern: 'js/src/**/*.spec.js', watched: true } - ]) reporters.push('coverage-istanbul') - conf.preprocessors = { - 'js/src/**/*.spec.js': ['rollup'] - } - conf.rollupPreprocessor = rollupPreprocessor conf.customLaunchers = customLaunchers conf.detectBrowsers = detectBrowsers conf.coverageIstanbulReporter = { @@ -165,7 +153,6 @@ if (browserStack) { conf.frameworks = frameworks conf.plugins = plugins conf.reporters = reporters -conf.files = files module.exports = karmaConfig => { // possible values: karmaConfig.LOG_DISABLE || karmaConfig.LOG_ERROR || karmaConfig.LOG_WARN || karmaConfig.LOG_INFO || karmaConfig.LOG_DEBUG diff --git a/js/src/.eslintrc.json b/js/tests/units/.eslintrc.json index 18ffdc003d..a8c1a6ae34 100644 --- a/js/src/.eslintrc.json +++ b/js/tests/units/.eslintrc.json @@ -1,7 +1,7 @@ { "root": true, "extends": [ - "../../.eslintrc.json" + "../../../.eslintrc.json" ], "overrides": [ { diff --git a/js/src/alert/alert.spec.js b/js/tests/units/alert.spec.js index 61d656bd0c..32f11b6188 100644 --- a/js/src/alert/alert.spec.js +++ b/js/tests/units/alert.spec.js @@ -1,8 +1,8 @@ -import Alert from './alert' -import { makeArray, getTransitionDurationFromElement } from '../util/index' +import Alert from '../../src/alert' +import { makeArray, getTransitionDurationFromElement } from '../../src/util/index' /** Test helpers */ -import { getFixture, clearFixture, jQueryMock } from '../../tests/helpers/fixture' +import { getFixture, clearFixture, jQueryMock } from '../helpers/fixture' describe('Alert', () => { let fixtureEl diff --git a/js/src/button/button.spec.js b/js/tests/units/button.spec.js index 6228811854..a3c95be1ba 100644 --- a/js/src/button/button.spec.js +++ b/js/tests/units/button.spec.js @@ -1,5 +1,5 @@ -import Button from './button' -import EventHandler from '../dom/event-handler' +import Button from '../../src/button' +import EventHandler from '../../src/dom/event-handler' /** Test helpers */ import { @@ -7,7 +7,7 @@ import { clearFixture, createEvent, jQueryMock -} from '../../tests/helpers/fixture' +} from '../helpers/fixture' describe('Button', () => { let fixtureEl diff --git a/js/src/carousel/carousel.spec.js b/js/tests/units/carousel.spec.js index 4c13b6d227..a163f9ae41 100644 --- a/js/src/carousel/carousel.spec.js +++ b/js/tests/units/carousel.spec.js @@ -1,8 +1,8 @@ -import Carousel from './carousel' -import EventHandler from '../dom/event-handler' +import Carousel from '../../src/carousel' +import EventHandler from '../../src/dom/event-handler' /** Test helpers */ -import { getFixture, clearFixture, createEvent, jQueryMock } from '../../tests/helpers/fixture' +import { getFixture, clearFixture, createEvent, jQueryMock } from '../helpers/fixture' describe('Carousel', () => { const { Simulator, PointerEvent, MSPointerEvent } = window diff --git a/js/src/collapse/collapse.spec.js b/js/tests/units/collapse.spec.js index 154bc2c6bb..3122ae6f4b 100644 --- a/js/src/collapse/collapse.spec.js +++ b/js/tests/units/collapse.spec.js @@ -1,9 +1,9 @@ -import Collapse from './collapse' -import EventHandler from '../dom/event-handler' -import { makeArray } from '../util/index' +import Collapse from '../../src/collapse' +import EventHandler from '../../src/dom/event-handler' +import { makeArray } from '../../src/util/index' /** Test helpers */ -import { getFixture, clearFixture, jQueryMock } from '../../tests/helpers/fixture' +import { getFixture, clearFixture, jQueryMock } from '../helpers/fixture' describe('Collapse', () => { let fixtureEl diff --git a/js/src/dom/data.spec.js b/js/tests/units/dom/data.spec.js index 46018dd5ca..ab3240b9bb 100644 --- a/js/src/dom/data.spec.js +++ b/js/tests/units/dom/data.spec.js @@ -1,7 +1,7 @@ -import Data from './data' +import Data from '../../../src/dom/data' /** Test helpers */ -import { getFixture, clearFixture } from '../../tests/helpers/fixture' +import { getFixture, clearFixture } from '../../helpers/fixture' describe('Data', () => { let fixtureEl diff --git a/js/src/dom/event-handler.spec.js b/js/tests/units/dom/event-handler.spec.js index dc5c5c30ce..5551ddaa30 100644 --- a/js/src/dom/event-handler.spec.js +++ b/js/tests/units/dom/event-handler.spec.js @@ -1,7 +1,7 @@ -import EventHandler from './event-handler' +import EventHandler from '../../../src/dom/event-handler' /** Test helpers */ -import { getFixture, clearFixture } from '../../tests/helpers/fixture' +import { getFixture, clearFixture } from '../../helpers/fixture' describe('EventHandler', () => { let fixtureEl diff --git a/js/src/dom/manipulator.spec.js b/js/tests/units/dom/manipulator.spec.js index e96c068d44..986f692980 100644 --- a/js/src/dom/manipulator.spec.js +++ b/js/tests/units/dom/manipulator.spec.js @@ -1,7 +1,7 @@ -import Manipulator from './manipulator' +import Manipulator from '../../../src/dom/manipulator' /** Test helpers */ -import { getFixture, clearFixture } from '../../tests/helpers/fixture' +import { getFixture, clearFixture } from '../../helpers/fixture' describe('Manipulator', () => { let fixtureEl diff --git a/js/src/dom/selector-engine.spec.js b/js/tests/units/dom/selector-engine.spec.js index 28ccdf40b1..e13438e6fd 100644 --- a/js/src/dom/selector-engine.spec.js +++ b/js/tests/units/dom/selector-engine.spec.js @@ -1,8 +1,8 @@ -import SelectorEngine from './selector-engine' -import { makeArray } from '../util/index' +import SelectorEngine from '../../../src/dom/selector-engine' +import { makeArray } from '../../../src/util/index' /** Test helpers */ -import { getFixture, clearFixture } from '../../tests/helpers/fixture' +import { getFixture, clearFixture } from '../../helpers/fixture' describe('SelectorEngine', () => { let fixtureEl diff --git a/js/src/dropdown/dropdown.spec.js b/js/tests/units/dropdown.spec.js index 46374453c1..0046cf6809 100644 --- a/js/src/dropdown/dropdown.spec.js +++ b/js/tests/units/dropdown.spec.js @@ -1,10 +1,10 @@ import Popper from 'popper.js' -import Dropdown from './dropdown' -import EventHandler from '../dom/event-handler' +import Dropdown from '../../src/dropdown' +import EventHandler from '../../src/dom/event-handler' /** Test helpers */ -import { getFixture, clearFixture, createEvent, jQueryMock } from '../../tests/helpers/fixture' +import { getFixture, clearFixture, createEvent, jQueryMock } from '../helpers/fixture' describe('Dropdown', () => { let fixtureEl diff --git a/js/src/modal/modal.spec.js b/js/tests/units/modal.spec.js index 292f61f8bc..604934785a 100644 --- a/js/src/modal/modal.spec.js +++ b/js/tests/units/modal.spec.js @@ -1,9 +1,9 @@ -import Modal from './modal' -import EventHandler from '../dom/event-handler' -import { makeArray } from '../util/index' +import Modal from '../../src/modal' +import EventHandler from '../../src/dom/event-handler' +import { makeArray } from '../../src/util/index' /** Test helpers */ -import { getFixture, clearFixture, createEvent, jQueryMock } from '../../tests/helpers/fixture' +import { getFixture, clearFixture, createEvent, jQueryMock } from '../helpers/fixture' describe('Modal', () => { let fixtureEl diff --git a/js/src/popover/popover.spec.js b/js/tests/units/popover.spec.js index cf82e36ef1..1c6cd389c9 100644 --- a/js/src/popover/popover.spec.js +++ b/js/tests/units/popover.spec.js @@ -1,8 +1,8 @@ -import Popover from './popover' -import { makeArray } from '../util/index' +import Popover from '../../src/popover' +import { makeArray } from '../../src/util/index' /** Test helpers */ -import { getFixture, clearFixture, jQueryMock } from '../../tests/helpers/fixture' +import { getFixture, clearFixture, jQueryMock } from '../helpers/fixture' describe('Popover', () => { let fixtureEl diff --git a/js/src/scrollspy/scrollspy.spec.js b/js/tests/units/scrollspy.spec.js index a019a6d1af..9ac02ce99f 100644 --- a/js/src/scrollspy/scrollspy.spec.js +++ b/js/tests/units/scrollspy.spec.js @@ -1,9 +1,9 @@ -import ScrollSpy from './scrollspy' -import Manipulator from '../dom/manipulator' -import EventHandler from '../dom/event-handler' +import ScrollSpy from '../../src/scrollspy' +import Manipulator from '../../src/dom/manipulator' +import EventHandler from '../../src/dom/event-handler' /** Test helpers */ -import { getFixture, clearFixture, createEvent, jQueryMock } from '../../tests/helpers/fixture' +import { getFixture, clearFixture, createEvent, jQueryMock } from '../helpers/fixture' describe('ScrollSpy', () => { let fixtureEl diff --git a/js/src/tab/tab.spec.js b/js/tests/units/tab.spec.js index 0a678e38ee..3e45f4d03e 100644 --- a/js/src/tab/tab.spec.js +++ b/js/tests/units/tab.spec.js @@ -1,7 +1,7 @@ -import Tab from './tab' +import Tab from '../../src/tab' /** Test helpers */ -import { getFixture, clearFixture, jQueryMock } from '../../tests/helpers/fixture' +import { getFixture, clearFixture, jQueryMock } from '../helpers/fixture' describe('Tab', () => { let fixtureEl diff --git a/js/src/toast/toast.spec.js b/js/tests/units/toast.spec.js index b00b860856..ee623c8ccc 100644 --- a/js/src/toast/toast.spec.js +++ b/js/tests/units/toast.spec.js @@ -1,7 +1,7 @@ -import Toast from './toast' +import Toast from '../../src/toast' /** Test helpers */ -import { getFixture, clearFixture, jQueryMock } from '../../tests/helpers/fixture' +import { getFixture, clearFixture, jQueryMock } from '../helpers/fixture' describe('Toast', () => { let fixtureEl diff --git a/js/src/tooltip/tooltip.spec.js b/js/tests/units/tooltip.spec.js index a6cbd78475..338638a2d7 100644 --- a/js/src/tooltip/tooltip.spec.js +++ b/js/tests/units/tooltip.spec.js @@ -1,9 +1,9 @@ -import Tooltip from './tooltip' -import EventHandler from '../dom/event-handler' -import { makeArray, noop } from '../util/index' +import Tooltip from '../../src/tooltip' +import EventHandler from '../../src/dom/event-handler' +import { makeArray, noop } from '../../src/util/index' /** Test helpers */ -import { getFixture, clearFixture, jQueryMock, createEvent } from '../../tests/helpers/fixture' +import { getFixture, clearFixture, jQueryMock, createEvent } from '../helpers/fixture' describe('Tooltip', () => { let fixtureEl diff --git a/js/src/util/index.spec.js b/js/tests/units/util/index.spec.js index 9512c2fe0b..42c273f060 100644 --- a/js/src/util/index.spec.js +++ b/js/tests/units/util/index.spec.js @@ -1,7 +1,7 @@ -import * as Util from './index' +import * as Util from '../../../src/util/index' /** Test helpers */ -import { getFixture, clearFixture } from '../../tests/helpers/fixture' +import { getFixture, clearFixture } from '../../helpers/fixture' describe('Util', () => { let fixtureEl diff --git a/js/src/util/sanitizer.spec.js b/js/tests/units/util/sanitizer.spec.js index 6dadd29a5a..c4259e7fd6 100644 --- a/js/src/util/sanitizer.spec.js +++ b/js/tests/units/util/sanitizer.spec.js @@ -1,4 +1,4 @@ -import { DefaultWhitelist, sanitizeHtml } from './sanitizer' +import { DefaultWhitelist, sanitizeHtml } from '../../../src/util/sanitizer' describe('Sanitizer', () => { describe('sanitizeHtml', () => { |