Skip to content

Commit

Permalink
Prepend module name to sessionStorage keys to avoid conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
jzaefferer committed Mar 15, 2011
1 parent 2953732 commit d404faf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qunit/qunit.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Test.prototype = {
// store result when possible
if ( QUnit.config.reorder && defined.sessionStorage ) {
if (bad) {
sessionStorage.setItem("qunit-" + this.testName, bad)
sessionStorage.setItem("qunit-" + this.module + "-" + this.testName, bad)
} else {
sessionStorage.removeItem("qunit-" + this.testName);
}
Expand Down Expand Up @@ -239,7 +239,7 @@ Test.prototype = {
});
}
// defer when previous test run passed, if storage is available
var bad = QUnit.config.reorder && defined.sessionStorage && +sessionStorage.getItem("qunit-" + this.testName);
var bad = QUnit.config.reorder && defined.sessionStorage && +sessionStorage.getItem("qunit-" + this.module + "-" + this.testName);
if (bad) {
run();
} else {
Expand Down

0 comments on commit d404faf

Please sign in to comment.