diff options
author | Johann-S <johann.servoire@gmail.com> | 2019-10-02 15:32:29 +0300 |
---|---|---|
committer | Johann-S <johann.servoire@gmail.com> | 2019-10-03 10:55:57 +0300 |
commit | e1b82f51e21b6329d783406cfbc9c847c798ef23 (patch) | |
tree | ad32ac24fc0b366b53d989531d221e5a3a9f5b21 /js/tests | |
parent | 3d12b541c488ea09efced2fb987fcbf384c656bb (diff) |
add modularity integration test
Diffstat (limited to 'js/tests')
-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 0000000000..07c6674e65 --- /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 0000000000..68313275bd --- /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 |