Skip to content

Commit

Permalink
Build: Split source to smaller files.
Browse files Browse the repository at this point in the history
Closes #785
Fixes #782
  • Loading branch information
BraulioVM authored and leobalter committed Jul 15, 2015
1 parent 67bc261 commit 825691f
Show file tree
Hide file tree
Showing 8 changed files with 543 additions and 541 deletions.
4 changes: 4 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ grunt.initConfig({
options: { process: process },
src: [
"src/intro.js",
"src/core/utilities.js",
"src/core/stacktrace.js",
"src/core/config.js",
"src/core/logging.js",
"src/core.js",
"src/test.js",
"src/assert.js",
Expand Down
20 changes: 20 additions & 0 deletions src/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,23 @@ QUnit.assert = Assert.prototype = {
/*jshint sub:true */
Assert.prototype.raises = Assert.prototype[ "throws" ];
}());

function errorString( error ) {
var name, message,
resultErrorString = error.toString();
if ( resultErrorString.substring( 0, 7 ) === "[object" ) {
name = error.name ? error.name.toString() : "Error";
message = error.message ? error.message.toString() : "";
if ( name && message ) {
return name + ": " + message;
} else if ( name ) {
return name;
} else if ( message ) {
return message;
} else {
return "Error";
}
} else {
return resultErrorString;
}
}
Loading

0 comments on commit 825691f

Please sign in to comment.