diff options
Diffstat (limited to 'node_modules/unique-slug/test/index.js')
-rw-r--r-- | node_modules/unique-slug/test/index.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/node_modules/unique-slug/test/index.js b/node_modules/unique-slug/test/index.js new file mode 100644 index 000000000..6866678ed --- /dev/null +++ b/node_modules/unique-slug/test/index.js @@ -0,0 +1,13 @@ +'use strict' +var t = require('tap') +var uniqueSlug = require('../index.js') + +t.plan(5) +var slugA = uniqueSlug() +t.is(slugA.length, 32, 'random slugs are 32 chars') +t.notEqual(slugA, uniqueSlug(), "two slugs aren't the same") +var base = '/path/to/thingy' +var slugB = uniqueSlug(base) +t.is(slugB.length, 32, 'string based slugs are 32 chars') +t.is(slugB, uniqueSlug(base), 'two string based slugs, from the same string are the same') +t.notEqual(slugB, uniqueSlug(slugA), 'two string based slongs, from diff strings are different') |