Skip to content

Commit

Permalink
Add browser test support
Browse files Browse the repository at this point in the history
  • Loading branch information
matthijsgroen committed Jan 6, 2013
1 parent ba2efab commit 62da03a
Show file tree
Hide file tree
Showing 9 changed files with 376 additions and 168 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
node_modules/
File renamed without changes.
337 changes: 171 additions & 166 deletions chai-changes.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions develop.sh
@@ -0,0 +1,4 @@
#!/bin/bash
coffee -cw -o . *.coffee & cd test/ && coffee -cw -o . *.coffee


11 changes: 10 additions & 1 deletion package.json
Expand Up @@ -15,5 +15,14 @@
"devDependencies": {
"chai": ">= 1.0.0",
"mocha": ">= 1.0.0"
}
},
"scripts": {
"test": "./test.sh"
},
"licenses": [
{
"type": "MIT",
"url": "http://github.com/matthijsgroen/chai-changes/blob/master/LICENSE"
}
]
}
3 changes: 3 additions & 0 deletions test.sh
@@ -0,0 +1,3 @@
#!/bin/bash
coffee -c -o . . && coffee -c -o test/ test/ && xdg-open test/browser/index.html

22 changes: 22 additions & 0 deletions test/browser/index.html
@@ -0,0 +1,22 @@
<html>
<head>
<title>Chai Changes</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../node_modules/mocha/mocha.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="../../node_modules/mocha/mocha.js"></script>
<script>mocha.setup('bdd')</script>
<script src="../../node_modules/chai/chai.js"></script>
<script src="https://raw.github.com/cujojs/when/master/when.js"></script>
<script src="../../chai-changes.js"></script>
<script src="../chai-changes_spec.js"></script>
<script>onload = function() {
mocha.run();
}
</script>
</head>
<body>
<div id="mocha"></div>
</body>
</html>

0 comments on commit 62da03a

Please sign in to comment.