Skip to content
GitLab
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
7a80b801
Commit
7a80b801
authored
11 years ago
by
jonahss
Committed by
Chris Rebert
11 years ago
Browse files
Options
Download
Email Patches
Plain Diff
updated qunit test reporting so sauce labs can report failing tests
parent
4b622c60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/tests/index.html
+26
-2
js/tests/index.html
with
26 additions
and
2 deletions
+26
-2
js/tests/index.html
+
26
-
2
View file @
7a80b801
...
...
@@ -11,8 +11,32 @@
<script
src=
"vendor/qunit.js"
></script>
<script>
// See https://github.com/axemclion/grunt-saucelabs#test-result-details-with-qunit
QUnit
.
done
(
function
(
results
)
{
window
.
global_test_results
=
results
var
log
=
[]
QUnit
.
done
=
function
(
test_results
)
{
var
tests
=
log
.
map
(
function
(
details
)
{
return
{
name
:
details
.
name
,
result
:
details
.
result
,
expected
:
details
.
expected
,
actual
:
details
.
actual
,
source
:
details
.
source
}
})
test_results
.
tests
=
tests
// Delaying results a bit because in real-world scenario you won't get them immediately
setTimeout
(
function
()
{
window
.
global_test_results
=
test_results
},
2000
)
}
QUnit
.
testStart
(
function
(
testDetails
)
{
QUnit
.
log
=
function
(
details
)
{
if
(
!
details
.
result
)
{
details
.
name
=
testDetails
.
name
log
.
push
(
details
)
}
}
})
</script>
...
...
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