项目原始demo,不改动
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
To repozytorium jest zarchiwizowane. Możesz wyświetlać pliki i je sklonować, ale nie możesz do niego przepychać zmian lub otwierać zgłoszeń/Pull Requestów.
 
 
 
 

14 wiersze
525 B

  1. 'use strict'
  2. var t = require('tap')
  3. var uniqueSlug = require('../index.js')
  4. t.plan(5)
  5. var slugA = uniqueSlug()
  6. t.is(slugA.length, 8, 'random slugs are 8 chars')
  7. t.notEqual(slugA, uniqueSlug(), "two slugs aren't the same")
  8. var base = '/path/to/thingy'
  9. var slugB = uniqueSlug(base)
  10. t.is(slugB.length, 8, 'string based slugs are 8 chars')
  11. t.is(slugB, uniqueSlug(base), 'two string based slugs, from the same string are the same')
  12. t.notEqual(slugB, uniqueSlug(slugA), 'two string based slongs, from diff strings are different')