Last change
on this file since fa375fe 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'
|
---|
2 | var t = require('tap')
|
---|
3 | var uniqueSlug = require('../index.js')
|
---|
4 |
|
---|
5 | t.plan(5)
|
---|
6 | var slugA = uniqueSlug()
|
---|
7 | t.is(slugA.length, 8, 'random slugs are 8 chars')
|
---|
8 | t.notEqual(slugA, uniqueSlug(), "two slugs aren't the same")
|
---|
9 | var base = '/path/to/thingy'
|
---|
10 | var slugB = uniqueSlug(base)
|
---|
11 | t.is(slugB.length, 8, 'string based slugs are 8 chars')
|
---|
12 | t.is(slugB, uniqueSlug(base), 'two string based slugs, from the same string are the same')
|
---|
13 | t.notEqual(slugB, uniqueSlug(slugA), 'two string based slongs, from diff strings are different')
|
---|
Note:
See
TracBrowser
for help on using the repository browser.