mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-11 16:14:04 +02:00
add unit tests to ensure our plugins works in jquery
This commit is contained in:
@@ -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(
|
||||
|
Reference in New Issue
Block a user