|
|
51ca1a |
diff --git a/test/index.js b/test/index.js
|
|
|
51ca1a |
index 0f4ccad..6441d67 100644
|
|
|
51ca1a |
--- a/test/index.js
|
|
|
51ca1a |
+++ b/test/index.js
|
|
|
51ca1a |
@@ -1,13 +1,15 @@
|
|
|
51ca1a |
'use strict'
|
|
|
51ca1a |
-var t = require('tap')
|
|
|
51ca1a |
+var test = require('tap').test
|
|
|
51ca1a |
var uniqueSlug = require('../index.js')
|
|
|
51ca1a |
|
|
|
51ca1a |
-t.plan(5)
|
|
|
51ca1a |
-var slugA = uniqueSlug()
|
|
|
51ca1a |
-t.is(slugA.length, 8, 'random slugs are 8 chars')
|
|
|
51ca1a |
-t.notEqual(slugA, uniqueSlug(), "two slugs aren't the same")
|
|
|
51ca1a |
-var base = '/path/to/thingy'
|
|
|
51ca1a |
-var slugB = uniqueSlug(base)
|
|
|
51ca1a |
-t.is(slugB.length, 8, 'string based slugs are 8 chars')
|
|
|
51ca1a |
-t.is(slugB, uniqueSlug(base), 'two string based slugs, from the same string are the same')
|
|
|
51ca1a |
-t.notEqual(slugB, uniqueSlug(slugA), 'two string based slongs, from diff strings are different')
|
|
|
51ca1a |
+test("test all the things", function (t) {
|
|
|
51ca1a |
+ t.plan(5)
|
|
|
51ca1a |
+ var slugA = uniqueSlug()
|
|
|
51ca1a |
+ t.equal(slugA.length, 8, 'random slugs are 8 chars')
|
|
|
51ca1a |
+ t.notEqual(slugA, uniqueSlug(), "two slugs aren't the same")
|
|
|
51ca1a |
+ var base = '/path/to/thingy'
|
|
|
51ca1a |
+ var slugB = uniqueSlug(base)
|
|
|
51ca1a |
+ t.equal(slugB.length, 8, 'string based slugs are 8 chars')
|
|
|
51ca1a |
+ t.equal(slugB, uniqueSlug(base), 'two string based slugs, from the same string are the same')
|
|
|
51ca1a |
+ t.notEqual(slugB, uniqueSlug(slugA), 'two string based slongs, from diff strings are different')
|
|
|
51ca1a |
+});
|