diff options
| author | Johann-S <[email protected]> | 2019-10-02 14:32:29 +0200 |
|---|---|---|
| committer | Johann-S <[email protected]> | 2019-10-03 09:55:57 +0200 |
| commit | e1b82f51e21b6329d783406cfbc9c847c798ef23 (patch) | |
| tree | ad32ac24fc0b366b53d989531d221e5a3a9f5b21 /js | |
| parent | 3d12b541c488ea09efced2fb987fcbf384c656bb (diff) | |
| download | bootstrap-e1b82f51e21b6329d783406cfbc9c847c798ef23.tar.xz bootstrap-e1b82f51e21b6329d783406cfbc9c847c798ef23.zip | |
add modularity integration test
Diffstat (limited to 'js')
| -rw-r--r-- | js/tests/integration/bundle-modularity.js | 7 | ||||
| -rw-r--r-- | js/tests/integration/rollup.bundle-modularity.js | 17 |
2 files changed, 24 insertions, 0 deletions
diff --git a/js/tests/integration/bundle-modularity.js b/js/tests/integration/bundle-modularity.js new file mode 100644 index 000000000..07c6674e6 --- /dev/null +++ b/js/tests/integration/bundle-modularity.js @@ -0,0 +1,7 @@ +import 'popper.js' +import Tooltip from '../../dist/tooltip' + +window.addEventListener('load', () => { + [...document.querySelectorAll('[data-toggle="tooltip"]')] + .map(tooltipNode => new Tooltip(tooltipNode)) +}) diff --git a/js/tests/integration/rollup.bundle-modularity.js b/js/tests/integration/rollup.bundle-modularity.js new file mode 100644 index 000000000..68313275b --- /dev/null +++ b/js/tests/integration/rollup.bundle-modularity.js @@ -0,0 +1,17 @@ +/* eslint-env node */ + +const commonjs = require('rollup-plugin-commonjs') +const configRollup = require('./rollup.bundle') + +const config = { + ...configRollup, + input: 'js/tests/integration/bundle-modularity.js', + output: { + file: 'js/coverage/bundle-modularity.js', + format: 'iife' + } +} + +config.plugins.unshift(commonjs()) + +module.exports = config |
