Skip to content

Instantly share code, notes, and snippets.

@nkmry
Last active Aug 29, 2015
Embed
What would you like to do?
Mocha を使ってクライアントサイドのテストをするためのテンプレ
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" type="text/javascript"></script>
<link href="http://cdnjs.cloudflare.com/ajax/libs/mocha/1.13.0/mocha.css" rel="stylesheet"/>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mocha/1.13.0/mocha.js" type="text/javascript"></script>
<script src="http://chaijs.com/chai.js" type="text/javascript"></script>
<script type="text/javascript">
mocha.setup('bdd');
window.onload = mocha.run;
var should = chai.should();
</script>
<script type="text/javascript">
// mocha で テストを記述
</script>
</head>
<body>
<div id="mocha"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment