Permalink
Browse files

passing test

  • Loading branch information...
1 parent 5f40cd5 commit 9b8e73c953f441709cc8e5661d539fbf6bc8f7c9 @substack committed May 12, 2012
Showing with 14 additions and 0 deletions.
  1. +14 −0 test/names.js
View
@@ -0,0 +1,14 @@
+var test = require('tap').test;
+var identifier = require('../');
+
+test('names', function (t) {
+ t.plan(15 * 15 * 2);
+
+ for (var n = 1; n <= 15; n++) {
+ for (var i = 0; i < 15; i++) {
+ var name = identifier(n);
+ t.equal(name.length, n);
+ t.ok(/^[A-Za-z_]\w*$/.test(name), 'name=' + name);
+ }
+ }
+});

0 comments on commit 9b8e73c

Please sign in to comment.