Skip to content
Browse files

Convert test to nodeunit

Run it with

    nodeunit test/function-export.js

Install nodeunit with

    npm install -g nodeunit
  • Loading branch information...
1 parent 8ea81b5 commit 7d6beac9f5b25ec0923d1fdb2414b95b5db00dea @dohse dohse committed
Showing with 7 additions and 3 deletions.
  1. +7 −3 test/function-export.js
View
10 test/function-export.js
@@ -1,5 +1,9 @@
var sprintf = require(__dirname + '/..');
-sprintf('Hallo %s!', 'Welt');
-sprintf.sprintf('Hallo %s!', 'Welt');
-sprintf.vsprintf('Hallo %s!', ['Welt']);
+exports['sprintf() export works'] = function(test) {
+ test.equal(sprintf('Hallo %s!', 'Welt'), 'Hallo Welt!');
+ test.equal(sprintf.sprintf('Hallo %s!', 'Welt'), 'Hallo Welt!');
+ test.equal(sprintf.vsprintf('Hallo %s!', ['Welt']), 'Hallo Welt!');
+
+ test.done();
+};

0 comments on commit 7d6beac

Please sign in to comment.
Something went wrong with that request. Please try again.