We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ecf762b commit dc9adecCopy full SHA for dc9adec
lib/util/createBoundary.test.ts
@@ -0,0 +1,22 @@
1
+import test from "ava"
2
+
3
+import createBoundary from "./createBoundary"
4
5
+test("Returns a string", t => {
6
+ const actual = createBoundary(16)
7
8
+ t.is(typeof actual, "string")
9
+})
10
11
+test("Returns a string of given length", t => {
12
+ const expected = 24
13
+ const actual = createBoundary(expected)
14
15
+ t.is(actual.length, expected)
16
17
18
+test("Returns a string of characters in alphanum range", t => {
19
20
21
+ t.regex(actual, /^[a-zA-Z0-9]+$/)
22
0 commit comments