Skip to content

Commit

Permalink
showing the testing of an actual AMD module (nodeunit)
Browse files Browse the repository at this point in the history
  • Loading branch information
geddski committed Sep 9, 2011
1 parent 49e211d commit 3119311
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
File renamed without changes.
6 changes: 5 additions & 1 deletion nodeunit/js/moduletest.js
@@ -1,4 +1,4 @@
define(['nodeunit'], function(nodeunitNode) {
define(['./SampleModule', 'nodeunit'], function(SampleModule, nodeunitNode) {
//browsers have the global nodeunit already available
var nu = nodeunitNode || nodeunit;

Expand All @@ -11,6 +11,10 @@ define(['nodeunit'], function(nodeunitNode) {
this.foo = "";
callback();
},
testMyModule: function(test){
test.ok(SampleModule.name == 'sample');
test.done();
},
testSomething : function(test) {
test.ok(this.foo == 'hi', 'foo should be hi');
test.ok(true, "this assertion should pass");
Expand Down

0 comments on commit 3119311

Please sign in to comment.