Created
August 12, 2013 11:53
-
-
Save robertovg/6210224 to your computer and use it in GitHub Desktop.
mochaPhantomJS-runner
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<!-- Title & Meta --> | |
<title>Frontend tests</title> | |
<meta charset="utf-8"> | |
<!-- Stylesheets --> | |
<link rel="stylesheet" href="lib/mocha/mocha.css"> | |
</head> | |
<body> | |
<div id="mocha"></div> | |
<!-- Testing Libraries --> | |
<script src="lib/mocha/mocha.js"></script> | |
<script src="lib/chai/chai.js"></script> | |
<script src="lib/sinon/sinon.js"></script> | |
<script> | |
// Use the expect version of chai assertions - http://chaijs.com/api/bdd | |
chai.should(); | |
// Tell mocha we want TDD syntax | |
mocha.setup('bdd'); | |
</script> | |
<!-- Libs --> | |
<script src="../lib/jquery/jquery.js"></script> | |
<script src="../lib/underscore/underscore.js"></script> | |
<script src="../lib/backbone/backbone.js"></script> | |
<!-- Source files --> | |
<script src="../src/"></script> | |
<!-- Test --> | |
<script src="models/userBDD.test.js"></script> | |
<script> | |
if (window.mochaPhantomJS) { | |
mochaPhantomJS.run(); | |
}else { | |
mocha.run(); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment