source: trip-planner-front/node_modules/unique-slug/test/index.js@ 6a80231

Last change on this file since 6a80231 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years 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.