-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Note that this removes benchmarking, which wasn't working well anyways Closes #7 May improve #34, #36
- Loading branch information
1 parent
6e9ac5d
commit 5bfd19a
Showing
7 changed files
with
98 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<!-- test/support/index.html --> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Mocha Tests</title> | ||
|
||
<link href="https://npmcdn.com/[email protected]/mocha.css" rel="stylesheet" /> | ||
<script src="https://npmcdn.com/[email protected]/mocha.js"></script> | ||
</head> | ||
<body> | ||
|
||
<!-- A container element for the visual Mocha results --> | ||
<div id="mocha"></div> | ||
|
||
<!-- Mocha setup and initiation code --> | ||
<script> | ||
mocha.setup('bdd'); | ||
window.onload = function() { | ||
var runner = mocha.run(); | ||
var failedTests = []; | ||
|
||
runner.on('end', function() { | ||
window.mochaResults = runner.stats; | ||
window.mochaResults.reports = failedTests; | ||
}); | ||
|
||
runner.on('fail', logFailure); | ||
|
||
function logFailure(test, err){ | ||
var flattenTitles = function(test){ | ||
var titles = []; | ||
while (test.parent.title){ | ||
titles.push(test.parent.title); | ||
test = test.parent; | ||
} | ||
return titles.reverse(); | ||
}; | ||
|
||
failedTests.push({ | ||
name: test.title, | ||
result: false, | ||
message: err.message, | ||
stack: err.stack, | ||
titles: flattenTitles(test) | ||
}); | ||
}; | ||
}; | ||
</script> | ||
<script src="./dist/bundle.js"></script> | ||
|
||
</body> | ||
</html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters