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
diff options
context:
space:
mode:
authorJohann-S <johann.servoire@gmail.com>2020-05-06 08:23:05 +0300
committerJohann-S <johann.servoire@gmail.com>2020-05-06 08:55:48 +0300
commit650a7a7b76c8fa82d869194a9db5c01ebe29e33c (patch)
tree3e861e655765a486ef24b9b9369622d3246b0c31 /js/tests/karma.conf.js
parentd1575b6b6bbdcf7cd2371953b4d3d165ae941c02 (diff)
add unit tests to ensure our plugins works in jquery
Diffstat (limited to 'js/tests/karma.conf.js')
-rw-r--r--js/tests/karma.conf.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/js/tests/karma.conf.js b/js/tests/karma.conf.js
index be5982e264..1ab0629a4e 100644
--- a/js/tests/karma.conf.js
+++ b/js/tests/karma.conf.js
@@ -14,6 +14,7 @@ const babelHelpers = require('../../build/babel-helpers.js')
const { env } = process
const browserStack = env.BROWSER === 'true'
const debug = env.DEBUG === 'true'
+const jQueryTest = env.JQUERY === 'true'
const frameworks = [
'jasmine'
]
@@ -59,7 +60,7 @@ const conf = {
},
files: [
'node_modules/hammer-simulator/index.js',
- { pattern: 'js/tests/unit/**/*.spec.js', watched: !browserStack }
+ { pattern: 'js/tests/unit/**/!(jquery).spec.js', watched: !browserStack }
],
preprocessors: {
'js/tests/unit/**/*.spec.js': ['rollup']
@@ -101,6 +102,19 @@ if (browserStack) {
conf.customLaunchers = browsers
conf.browsers = browsersKeys
reporters.push('BrowserStack', 'kjhtml')
+} else if (jQueryTest) {
+ frameworks.push('detectBrowsers')
+ plugins.push(
+ 'karma-chrome-launcher',
+ 'karma-firefox-launcher',
+ 'karma-detect-browsers'
+ )
+ conf.customLaunchers = customLaunchers
+ conf.detectBrowsers = detectBrowsers
+ conf.files = [
+ 'node_modules/jquery/dist/jquery.slim.min.js',
+ { pattern: 'js/tests/unit/jquery.spec.js', watched: false }
+ ]
} else {
frameworks.push('detectBrowsers')
plugins.push(