Skip to content

Commit

Permalink
Build: Detach jsDiff and HTML Reporter from QUnit
Browse files Browse the repository at this point in the history
They're still built together anyway, but this allows us to make a special
build for QUnit to report on console only
  • Loading branch information
leobalter committed Jul 22, 2014
1 parent 36020d9 commit 40f427b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ grunt.initConfig({
"src/equiv.js",
"src/dump.js",
"src/export.js",
"src/outro.js",
"external/jsdiff/jsdiff.js",
"reporter/html.js",
"src/outro.js"
"reporter/html.js"
],
dest: "dist/qunit.js"
},
Expand Down
6 changes: 4 additions & 2 deletions external/jsdiff/jsdiff.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* QUnit.diff( "the quick brown fox jumped over", "the quick fox jumps over" ) == "the quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over"
*/
QUnit.diff = (function() {
var hasOwn = Object.prototype.hasOwnProperty;

/*jshint eqeqeq:false, eqnull:true */
function diff( o, n ) {
var i,
Expand Down Expand Up @@ -127,7 +129,7 @@ QUnit.diff = (function() {
if ( out.n[ i ].text == null ) {
str += "<ins>" + out.n[ i ] + nSpace[ i ] + "</ins>";
} else {

// `pre` initialized at top of scope
pre = "";

Expand All @@ -141,4 +143,4 @@ QUnit.diff = (function() {

return str;
};
}());
}());

0 comments on commit 40f427b

Please sign in to comment.