Add sauce labs testing support

This commit is contained in:
kpdecker
2013-12-23 02:17:32 -06:00
parent 9ad8b86ece
commit fe7bc0d4bd
5 changed files with 86 additions and 11 deletions
+42
View File
@@ -0,0 +1,42 @@
<html>
<head>
<title>Mocha</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/node_modules/mocha/mocha.css" />
<script src="/node_modules/mocha/mocha.js"></script>
<script>
mocha.setup('bdd');
</script>
<script src="/dist/handlebars.js"></script>
<script src="/spec/env/common.js"></script>
<script>
var CompilerContext = {
compile: function(template, options) {
var templateSpec = handlebarsEnv.precompile(template, options);
return handlebarsEnv.template(safeEval(templateSpec));
},
compileWithPartial: function(template, options) {
return handlebarsEnv.compile(template, options);
}
};
function safeEval(templateSpec) {
var ret;
eval('ret = ' + templateSpec);
return ret;
}
</script>
<script src="/tmp/tests.js"></script>
<script>
onload = function(){
mocha.checkLeaks();
mocha.run();
};
</script>
</head>
<body>
<div id="mocha"></div>
</body>
</html>