source: node_modules/unique-slug/test/index.js@ 81bc7da

finki-main main
Last change on this file since 81bc7da was 81bc7da, checked in by Klimentina Efremova <klimentina08642@…>, 3 months ago

Initial commit

  • Property mode set to 100644
File size: 525 bytes
Line 
1'use strict'
2var t = require('tap')
3var uniqueSlug = require('../index.js')
4
5t.plan(5)
6var slugA = uniqueSlug()
7t.is(slugA.length, 8, 'random slugs are 8 chars')
8t.notEqual(slugA, uniqueSlug(), "two slugs aren't the same")
9var base = '/path/to/thingy'
10var slugB = uniqueSlug(base)
11t.is(slugB.length, 8, 'string based slugs are 8 chars')
12t.is(slugB, uniqueSlug(base), 'two string based slugs, from the same string are the same')
13t.notEqual(slugB, uniqueSlug(slugA), 'two string based slongs, from diff strings are different')
Note: See TracBrowser for help on using the repository browser.