@@ -39,32 +39,32 @@ tape( 'the main export is a polyfill if an environment does not support String.p
3939 var startsWith = proxyquire ( './../lib' , {
4040 './has_builtin.js' : false
4141 } ) ;
42- t . equal ( startsWith , polyfill , 'returns expected value' ) ;
42+ t . strictEqual ( startsWith , polyfill , 'returns expected value' ) ;
4343 t . end ( ) ;
4444} ) ;
4545
4646tape ( 'the main export is a wrapper around a builtin if an environment supports String.prototype.startsWith' , function test ( t ) {
4747 var startsWith = proxyquire ( './../lib' , {
4848 './has_builtin.js' : true
4949 } ) ;
50- t . equal ( startsWith , main , 'returns expected value' ) ;
50+ t . strictEqual ( startsWith , main , 'returns expected value' ) ;
5151 t . end ( ) ;
5252} ) ;
5353
5454tape ( 'the function returns `true` if the input string starts with the search value' , function test ( t ) {
5555 var bool ;
5656
5757 bool = startsWith ( 'Too late, I\'m afraid' , 'Too' , 0 ) ;
58- t . strictEqual ( bool , true , 'returns true ' ) ;
58+ t . strictEqual ( bool , true , 'returns expected value ' ) ;
5959
6060 bool = startsWith ( 'Not too late, I\'m afraid' , 'Not' , 0 ) ;
61- t . strictEqual ( bool , true , 'returns true ' ) ;
61+ t . strictEqual ( bool , true , 'returns expected value ' ) ;
6262
6363 bool = startsWith ( 'Welcome home!' , 'Welcome home' , 0 ) ;
64- t . strictEqual ( bool , true , 'returns true ' ) ;
64+ t . strictEqual ( bool , true , 'returns expected value ' ) ;
6565
6666 bool = startsWith ( 'Welcome home!' , 'Welcome home!' , 0 ) ;
67- t . strictEqual ( bool , true , 'returns true ' ) ;
67+ t . strictEqual ( bool , true , 'returns expected value ' ) ;
6868
6969 t . end ( ) ;
7070} ) ;
@@ -73,13 +73,13 @@ tape( 'the function returns `false` if the input string does not start with the
7373 var bool ;
7474
7575 bool = startsWith ( 'Too late, I\'m afraid' , 'too' , 0 ) ;
76- t . strictEqual ( bool , false , 'returns false ' ) ;
76+ t . strictEqual ( bool , false , 'returns expected value ' ) ;
7777
7878 bool = startsWith ( 'Not too late, I\'m afraid' , 'Never' , 0 ) ;
79- t . strictEqual ( bool , false , 'returns false ' ) ;
79+ t . strictEqual ( bool , false , 'returns expected value ' ) ;
8080
8181 bool = startsWith ( 'Welcome home!' , 'Welcome at home' , 0 ) ;
82- t . strictEqual ( bool , false , 'returns false ' ) ;
82+ t . strictEqual ( bool , false , 'returns expected value ' ) ;
8383
8484 t . end ( ) ;
8585} ) ;
@@ -88,16 +88,16 @@ tape( 'the function supports providing a starting search position relative to th
8888 var bool ;
8989
9090 bool = startsWith ( 'Too late, I\'m afraid' , 'late' , 3 ) ;
91- t . strictEqual ( bool , false , 'returns false ' ) ;
91+ t . strictEqual ( bool , false , 'returns expected value ' ) ;
9292
9393 bool = startsWith ( 'Too late, I\'m afraid' , 'late' , 4 ) ;
94- t . strictEqual ( bool , true , 'returns true ' ) ;
94+ t . strictEqual ( bool , true , 'returns expected value ' ) ;
9595
9696 bool = startsWith ( 'Too late, I\'m afraid' , 'late' , 5 ) ;
97- t . strictEqual ( bool , false , 'returns false ' ) ;
97+ t . strictEqual ( bool , false , 'returns expected value ' ) ;
9898
9999 bool = startsWith ( 'Too late, I\'m afraid' , 'afraid' , 14 ) ;
100- t . strictEqual ( bool , true , 'returns true ' ) ;
100+ t . strictEqual ( bool , true , 'returns expected value ' ) ;
101101
102102 t . end ( ) ;
103103} ) ;
@@ -106,37 +106,37 @@ tape( 'the function supports providing a starting search position relative to th
106106 var bool ;
107107
108108 bool = startsWith ( 'Too late, I\'m afraid' , 'i' , - 2 ) ;
109- t . strictEqual ( bool , true , 'returns true ' ) ;
109+ t . strictEqual ( bool , true , 'returns expected value ' ) ;
110110
111111 bool = startsWith ( 'Too late, I\'m afraid' , 'afr' , - 7 ) ;
112- t . strictEqual ( bool , false , 'returns false ' ) ;
112+ t . strictEqual ( bool , false , 'returns expected value ' ) ;
113113
114114 bool = startsWith ( 'Too late, I\'m afraid' , 'afr' , - 6 ) ;
115- t . strictEqual ( bool , true , 'returns true ' ) ;
115+ t . strictEqual ( bool , true , 'returns expected value ' ) ;
116116
117117 bool = startsWith ( 'Too late, I\'m afraid' , 'afr' , - 5 ) ;
118- t . strictEqual ( bool , false , 'returns false ' ) ;
118+ t . strictEqual ( bool , false , 'returns expected value ' ) ;
119119
120120 bool = startsWith ( 'Too late, I\'m afraid' , 'afraid' , - 6 ) ;
121- t . strictEqual ( bool , true , 'returns true ' ) ;
121+ t . strictEqual ( bool , true , 'returns expected value ' ) ;
122122
123123 t . end ( ) ;
124124} ) ;
125125
126126tape ( 'the function returns `false` if provided a search string which exceeds the input string length' , function test ( t ) {
127127 var bool = startsWith ( 'abc' , 'abcde' , 0 ) ;
128- t . strictEqual ( bool , false , 'returns false ' ) ;
128+ t . strictEqual ( bool , false , 'returns expected value ' ) ;
129129 t . end ( ) ;
130130} ) ;
131131
132132tape ( 'the function returns `false` if provided a search string which exceeds the input (sub)string length' , function test ( t ) {
133133 var bool ;
134134
135135 bool = startsWith ( 'abc' , 'bcd' , 1 ) ;
136- t . strictEqual ( bool , false , 'returns false ' ) ;
136+ t . strictEqual ( bool , false , 'returns expected value ' ) ;
137137
138138 bool = startsWith ( 'abc' , 'bcd' , - 2 ) ;
139- t . strictEqual ( bool , false , 'returns false ' ) ;
139+ t . strictEqual ( bool , false , 'returns expected value ' ) ;
140140
141141 t . end ( ) ;
142142} ) ;
@@ -145,31 +145,31 @@ tape( 'the function returns `true` if provided an empty search string', function
145145 var bool ;
146146
147147 bool = startsWith ( '' , '' , 0 ) ;
148- t . strictEqual ( bool , true , 'returns true ' ) ;
148+ t . strictEqual ( bool , true , 'returns expected value ' ) ;
149149
150150 bool = startsWith ( 'abc' , '' , 0 ) ;
151- t . strictEqual ( bool , true , 'returns true ' ) ;
151+ t . strictEqual ( bool , true , 'returns expected value ' ) ;
152152
153153 bool = startsWith ( 'abc' , '' , 10 ) ;
154- t . strictEqual ( bool , true , 'returns true ' ) ;
154+ t . strictEqual ( bool , true , 'returns expected value ' ) ;
155155
156156 bool = startsWith ( 'abc' , '' , - 10 ) ;
157- t . strictEqual ( bool , true , 'returns true ' ) ;
157+ t . strictEqual ( bool , true , 'returns expected value ' ) ;
158158
159159 bool = startsWith ( 'abc' , '' , 0 ) ;
160- t . strictEqual ( bool , true , 'returns true ' ) ;
160+ t . strictEqual ( bool , true , 'returns expected value ' ) ;
161161
162162 t . end ( ) ;
163163} ) ;
164164
165165tape ( 'the function returns `false` if provided a position exceeding the input string length (positive)' , function test ( t ) {
166166 var bool = startsWith ( 'abc' , 'c' , 99999 ) ;
167- t . strictEqual ( bool , false , 'returns false ' ) ;
167+ t . strictEqual ( bool , false , 'returns expected value ' ) ;
168168 t . end ( ) ;
169169} ) ;
170170
171171tape ( 'the function returns `false` if provided a position exceeding the input string length (negative)' , function test ( t ) {
172172 var bool = startsWith ( 'abc' , 'a' , - 5 ) ;
173- t . strictEqual ( bool , false , 'returns false ' ) ;
173+ t . strictEqual ( bool , false , 'returns expected value ' ) ;
174174 t . end ( ) ;
175175} ) ;
0 commit comments