Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js/tests
diff options
context:
space:
mode:
authorJohann-S <johann.servoire@gmail.com>2019-10-02 15:32:29 +0300
committerJohann-S <johann.servoire@gmail.com>2019-10-03 10:55:57 +0300
commite1b82f51e21b6329d783406cfbc9c847c798ef23 (patch)
treead32ac24fc0b366b53d989531d221e5a3a9f5b21 /js/tests
parent3d12b541c488ea09efced2fb987fcbf384c656bb (diff)
add modularity integration test
Diffstat (limited to 'js/tests')
-rw-r--r--js/tests/integration/bundle-modularity.js7
-rw-r--r--js/tests/integration/rollup.bundle-modularity.js17
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