-
Notifications
You must be signed in to change notification settings - Fork 404
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
75e6bc9
commit cb1e0a2
Showing
5 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
function hello(name){ | ||
return "hello " + (name || 'world'); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
var expect = chai.expect; | ||
|
||
describe('hello', function(){ | ||
it('should say hello', function(){ | ||
expect(hello()).to.equal('hello world'); | ||
}); | ||
it('should say hello to person', function(){ | ||
expect(hello('Bob')).to.equal('hello Bob'); | ||
}); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>Test'em</title> | ||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/mocha/2.3.4/mocha.css"> | ||
</head> | ||
<body> | ||
<div id="mocha"></div> | ||
<script src="/testem.js"></script> | ||
<script src="//cdnjs.cloudflare.com/ajax/libs/mocha/2.3.4/mocha.js"></script> | ||
<script src="//cdnjs.cloudflare.com/ajax/libs/chai/3.4.1/chai.js"></script> | ||
<script>mocha.setup('bdd')</script> | ||
<script src="hello.js"></script> | ||
<script src="hello_spec.js"></script> | ||
<script> | ||
Testem.hookIntoTestFramework(); | ||
mocha.run() | ||
</script> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"framework": "mocha", | ||
"test_page": "test.html", | ||
"src_files": [ | ||
"*.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