|
|
e5ebcf |
diff --git a/test/index.js b/test/index.js
|
|
|
e5ebcf |
index 105b4e5..39e1dab 100644
|
|
|
e5ebcf |
--- a/test/index.js
|
|
|
e5ebcf |
+++ b/test/index.js
|
|
|
e5ebcf |
@@ -1,23 +1,25 @@
|
|
|
e5ebcf |
-'sue strict'
|
|
|
e5ebcf |
-var t = require('tap')
|
|
|
e5ebcf |
+'use strict'
|
|
|
e5ebcf |
+var test = require('tap').test
|
|
|
e5ebcf |
var uniqueFilename = require('../index.js')
|
|
|
e5ebcf |
|
|
|
e5ebcf |
-t.plan(6)
|
|
|
e5ebcf |
+test("test all the things", function (t) {
|
|
|
e5ebcf |
+ t.plan(6)
|
|
|
e5ebcf |
|
|
|
e5ebcf |
-var randomTmpfile = uniqueFilename('tmp')
|
|
|
e5ebcf |
-t.like(randomTmpfile, /^tmp.[a-f0-9]{8}$/, 'random tmp file')
|
|
|
e5ebcf |
+ var randomTmpfile = uniqueFilename('tmp')
|
|
|
e5ebcf |
+ t.like(randomTmpfile, /^tmp.[a-f0-9]{8}$/, 'random tmp file')
|
|
|
e5ebcf |
|
|
|
e5ebcf |
-var randomAgain = uniqueFilename('tmp')
|
|
|
e5ebcf |
-t.notEqual(randomAgain, randomTmpfile, 'random tmp files are not the same')
|
|
|
e5ebcf |
+ var randomAgain = uniqueFilename('tmp')
|
|
|
e5ebcf |
+ t.notEqual(randomAgain, randomTmpfile, 'random tmp files are not the same')
|
|
|
e5ebcf |
|
|
|
e5ebcf |
-var randomPrefixedTmpfile = uniqueFilename('tmp', 'my-test')
|
|
|
e5ebcf |
-t.like(randomPrefixedTmpfile, /^tmp.my-test-[a-f0-9]{8}$/, 'random prefixed tmp file')
|
|
|
e5ebcf |
+ var randomPrefixedTmpfile = uniqueFilename('tmp', 'my-test')
|
|
|
e5ebcf |
+ t.like(randomPrefixedTmpfile, /^tmp.my-test-[a-f0-9]{8}$/, 'random prefixed tmp file')
|
|
|
e5ebcf |
|
|
|
e5ebcf |
-var randomPrefixedAgain = uniqueFilename('tmp', 'my-test')
|
|
|
e5ebcf |
-t.notEqual(randomPrefixedAgain, randomPrefixedTmpfile, 'random prefixed tmp files are not the same')
|
|
|
e5ebcf |
+ var randomPrefixedAgain = uniqueFilename('tmp', 'my-test')
|
|
|
e5ebcf |
+ t.notEqual(randomPrefixedAgain, randomPrefixedTmpfile, 'random prefixed tmp files are not the same')
|
|
|
e5ebcf |
|
|
|
e5ebcf |
-var uniqueTmpfile = uniqueFilename('tmp', 'testing', '/my/thing/to/uniq/on')
|
|
|
e5ebcf |
-t.like(uniqueTmpfile, /^tmp.testing-7ddd44c0$/, 'unique filename')
|
|
|
e5ebcf |
+ var uniqueTmpfile = uniqueFilename('tmp', 'testing', '/my/thing/to/uniq/on')
|
|
|
e5ebcf |
+ t.like(uniqueTmpfile, /^tmp.testing-7ddd44c0$/, 'unique filename')
|
|
|
e5ebcf |
|
|
|
e5ebcf |
-var uniqueAgain = uniqueFilename('tmp', 'testing', '/my/thing/to/uniq/on')
|
|
|
e5ebcf |
-t.is(uniqueTmpfile, uniqueAgain, 'same unique string component produces same filename')
|
|
|
e5ebcf |
+ var uniqueAgain = uniqueFilename('tmp', 'testing', '/my/thing/to/uniq/on')
|
|
|
e5ebcf |
+ t.is(uniqueTmpfile, uniqueAgain, 'same unique string component produces same filename')
|
|
|
e5ebcf |
+})
|