Skip to content

Instantly share code, notes, and snippets.

@alex-seville
Created June 25, 2013 18:45
Show Gist options
  • Save alex-seville/5861160 to your computer and use it in GitHub Desktop.
Save alex-seville/5861160 to your computer and use it in GitHub Desktop.
Blanket with browser mocha+requirejs
<!DOCTYPE html>
<html>
<head>
<title>BaseViewModel.js specs</title>
<link rel="stylesheet" type="text/css" href="../node_modules/mocha/mocha.css">
</head>
<body>
<div id="mocha"></div>
<script src="../node_modules/mocha/mocha.js"></script>
<script src="../source/components/requirejs/require.js"></script>
<!-- blanket script references -->
<script type="text/javascript" data-cover-only="source/" src="../../dist/qunit/blanket.min.js"> </script>
<script type="text/javascript" src="../../src/adapters/mocha-blanket.js"></script>
<script>
mocha.setup("bdd");
require(["../source/config"], function (config) {
require(["spec/BaseViewModel.spec"], function (BaseViewModelSpec) {
mocha.run();
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment