Created
October 18, 2013 20:28
-
-
Save EloB/7047734 to your computer and use it in GitHub Desktop.
This is a Windows bug
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
{ | |
"test_page": "testem.mustache", | |
"framework": "mocha", | |
"src_files": [ | |
"lib/**/*.js", | |
"test/**/*.js" | |
], | |
"serve_files": [ | |
"test/**/*.js" | |
] | |
} |
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>Test'em</title> | |
<link rel="stylesheet" href="/testem/mocha.css"> | |
<script src="/testem/mocha.js"></script> | |
<script src="/testem.js"></script> | |
<script>mocha.setup('bdd')</script> | |
<!-- We say that you have a test.js in the test folder --> | |
{{#serve_files}}<script src="{{src}}"></script>{{/serve_files}} | |
<!-- This works but it's still wrong ("\" instead of "/") in Unix test/test.js and in Windows test\test.js --> | |
<!-- Here we have another example with custom template that doesn't work | |
<script src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.8/require.min.js"></script> | |
<script> | |
var files = []; | |
{{#serve_files}} | |
files.push("{{src}}"); // Here we will get test\test.js instead of test/test.js. In windows the test"CHAR TAB"est.js | |
{{/serve_files}} | |
require(files, function() { mocha.run() }); | |
</script> | |
--> | |
{{#styles}}<link rel="stylesheet" href="{{.}}">{{/styles}} | |
</head> | |
<body> | |
<div id="mocha"></div> | |
<script> | |
mocha.run() | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment