Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

showing the testing of an actual AMD module (nodeunit)

  • Loading branch information...
commit 31193110fac90bbb8e509fec795cb53b9e4ed195 1 parent 49e211d
@geddski geddski authored
View
0  nodeunit/SampleModule.js → nodeunit/js/SampleModule.js
File renamed without changes
View
6 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;
@@ -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");
Please sign in to comment.
Something went wrong with that request. Please try again.