Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
db26c9f4
Commit
db26c9f4
authored
10 years ago
by
Chris Rebert
Browse files
Options
Download
Email Patches
Plain Diff
Gruntfile: extract runSubset() func
parent
df9f5765
5 merge requests
!28721
Hot test
,
!13623
add [skip sauce] and [skip validator]
,
!16605
Test pull please ignore
,
!22103
test
,
!25326
Adjust examples
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Gruntfile.js
+7
-3
Gruntfile.js
with
7 additions
and
3 deletions
+7
-3
Gruntfile.js
+
7
-
3
View file @
db26c9f4
...
...
@@ -401,20 +401,24 @@ module.exports = function (grunt) {
// Docs HTML validation task
grunt
.
registerTask
(
'
validate-html
'
,
[
'
jekyll
'
,
'
validation
'
]);
var
runSubset
=
function
(
subset
)
{
return
!
process
.
env
.
TWBS_TEST
||
process
.
env
.
TWBS_TEST
===
subset
;
};
// Test task.
var
testSubtasks
=
[];
// Skip core tests if running a different subset of the test suite
if
(
!
process
.
env
.
TWBS_TEST
||
process
.
env
.
TWBS_TEST
===
'
core
'
)
{
if
(
runSubset
(
'
core
'
)
)
{
testSubtasks
=
testSubtasks
.
concat
([
'
dist-css
'
,
'
csslint
'
,
'
jshint
'
,
'
jscs
'
,
'
qunit
'
,
'
build-customizer-html
'
]);
}
// Skip HTML validation if running a different subset of the test suite
if
(
!
process
.
env
.
TWBS_TEST
||
process
.
env
.
TWBS_TEST
===
'
validate-html
'
)
{
if
(
runSubset
(
'
validate-html
'
)
)
{
testSubtasks
.
push
(
'
validate-html
'
);
}
// Only run Sauce Labs tests if there's a Sauce access key
if
(
typeof
process
.
env
.
SAUCE_ACCESS_KEY
!==
'
undefined
'
&&
// Skip Sauce if running a different subset of the test suite
(
!
process
.
env
.
TWBS_TEST
||
process
.
env
.
TWBS_TEST
===
'
sauce-js-unit
'
))
{
runSubset
(
'
sauce-js-unit
'
))
{
testSubtasks
.
push
(
'
connect
'
);
testSubtasks
.
push
(
'
saucelabs-qunit
'
);
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets