Created
September 8, 2016 20:18
-
-
Save JSila/dba60040ed12f8c9ea43513ece017c17 to your computer and use it in GitHub Desktop.
browser test runner example (mocha, chai, sinon withjquery)
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> | |
<head> | |
<title>Mocha Tests</title> | |
<link rel="stylesheet" href="/node_modules/mocha/mocha.css"> | |
</head> | |
<body> | |
<div id="mocha"></div> | |
<script src="https://code.jquery.com/jquery.min.js"></script> | |
<script src="/node_modules/mocha/mocha.js"></script> | |
<script src="/node_modules/chai/chai.js"></script> | |
<script src="/node_modules/sinon/pkg/sinon.js"></script> | |
<script> | |
mocha.setup('bdd'); | |
var assert = chai.assert; | |
</script> | |
<script src="/js/LoginForm.js"></script> | |
<script src="/js/LoginRequest.js"></script> | |
<script src="LoginForm.spec.js"></script> | |
<script src="LoginRequest.spec.js"></script> | |
<script> | |
mocha.run(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment