Skip to content

Commit

Permalink
Adding a QUnit.config.altertitle flag which will allow users to opt-o…
Browse files Browse the repository at this point in the history
…ut of the functionality introduced in 60147ca
  • Loading branch information
erikvold authored and jzaefferer committed Aug 5, 2011
1 parent 9097520 commit 8c3c44e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions qunit/qunit.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,9 @@ var config = {
// very useful in combination with "Hide passed tests" checked
reorder: true,

// by default, modify document.title when suite is done
altertitle: true,

noglobals: false,
notrycatch: false
};
Expand Down Expand Up @@ -791,8 +794,8 @@ function done() {
id( "qunit-testresult" ).innerHTML = html;
}

if ( typeof document !== "undefined" && document.title ) {
// show ✖ for bad, ✔ for good suite result in title
if ( config.altertitle && typeof document !== "undefined" && document.title ) {
// show ✖ for good, ✔ for bad suite result in title
// use escape sequences in case file gets loaded with non-utf-8-charset
document.title = [
(config.stats.bad ? "\u2716" : "\u2714"),
Expand Down

0 comments on commit 8c3c44e

Please sign in to comment.