Permalink
Browse files

Basic smoke-test Jakefile.

  • Loading branch information...
mde committed Aug 29, 2010
1 parent dc52bfe commit ce97bd94d131709c18bb5f4b590096f12190bd3f
Showing with 32 additions and 0 deletions.
  1. +32 −0 tests/Jakefile
View
@@ -0,0 +1,32 @@
+var sys = require('sys');
+
+desc('This is the default task.');
+task('default', [], function () {
+ console.log('Running the default task.');
+ console.log(sys.inspect(arguments));
+});
+
+namespace('foo', function () {
+ desc('This the foo:bar task');
+ task('bar', ['default', 'foo:baz', 'foo:qux'], function () {
+ console.log('doing foo:bar task');
+ console.log(sys.inspect(arguments));
+ });
+
+ desc('This the foo:baz task');
+ task('baz', [], function () {
+ console.log('doing foo:baz task');
+ console.log(sys.inspect(arguments));
+ });
+
+ desc('This the foo:qux task');
+ task('qux', [], function () {
+ console.log('starting async foo:qux task');
+ console.log(sys.inspect(arguments));
+ setTimeout(function () {
+ console.log('completing async foo:qux task');
+ complete();
+ }, 100);
+ }, true);
+
+});

0 comments on commit ce97bd9

Please sign in to comment.