@@ -24,16 +24,6 @@ describe("util", () => {
24
24
} )
25
25
} )
26
26
27
- describe ( "split" , ( ) => {
28
- it ( "should split at a comma" , ( ) => {
29
- expect ( util . split ( "Hello,world" , "," ) ) . toStrictEqual ( [ "Hello" , "world" ] )
30
- } )
31
-
32
- it ( "shouldn't split if the delimiter doesn't exist" , ( ) => {
33
- expect ( util . split ( "Hello world" , "," ) ) . toStrictEqual ( [ "Hello world" , "" ] )
34
- } )
35
- } )
36
-
37
27
describe ( "plural" , ( ) => {
38
28
it ( "should add an s if count is greater than 1" , ( ) => {
39
29
expect ( util . plural ( 2 , "dog" ) ) . toBe ( "dogs" )
@@ -57,43 +47,6 @@ describe("util", () => {
57
47
} )
58
48
} )
59
49
60
- describe ( "trimSlashes" , ( ) => {
61
- it ( "should remove leading slashes" , ( ) => {
62
- expect ( util . trimSlashes ( "/hello-world" ) ) . toBe ( "hello-world" )
63
- } )
64
-
65
- it ( "should remove trailing slashes" , ( ) => {
66
- expect ( util . trimSlashes ( "hello-world/" ) ) . toBe ( "hello-world" )
67
- } )
68
-
69
- it ( "should remove both leading and trailing slashes" , ( ) => {
70
- expect ( util . trimSlashes ( "/hello-world/" ) ) . toBe ( "hello-world" )
71
- } )
72
-
73
- it ( "should remove multiple leading and trailing slashes" , ( ) => {
74
- expect ( util . trimSlashes ( "///hello-world////" ) ) . toBe ( "hello-world" )
75
- } )
76
- } )
77
-
78
- describe ( "arrayify" , ( ) => {
79
- it ( "should return value it's already an array" , ( ) => {
80
- expect ( util . arrayify ( [ "hello" , "world" ] ) ) . toStrictEqual ( [ "hello" , "world" ] )
81
- } )
82
-
83
- it ( "should wrap the value in an array if not an array" , ( ) => {
84
- expect (
85
- util . arrayify ( {
86
- name : "Coder" ,
87
- version : "3.8" ,
88
- } ) ,
89
- ) . toStrictEqual ( [ { name : "Coder" , version : "3.8" } ] )
90
- } )
91
-
92
- it ( "should return an empty array if the value is undefined" , ( ) => {
93
- expect ( util . arrayify ( undefined ) ) . toStrictEqual ( [ ] )
94
- } )
95
- } )
96
-
97
50
describe ( "logError" , ( ) => {
98
51
beforeAll ( ( ) => {
99
52
mockLogger ( )
0 commit comments