@@ -7,9 +7,17 @@ var tape = require( 'tape' );
77var remark = require ( 'remark' ) ;
88var readSync = require ( 'to-vfile' ) . readSync ; // eslint-disable-line no-sync
99var isArray = require ( '@stdlib/assert/is-array' ) ;
10+ var IS_BROWSER = require ( '@stdlib/assert/is-browser' ) ;
1011var lint = require ( './../lib' ) ;
1112
1213
14+ // VARIABLES //
15+
16+ var opts = {
17+ 'skip' : IS_BROWSER
18+ } ;
19+
20+
1321// TESTS //
1422
1523tape ( 'main export is a function' , function test ( t ) {
@@ -18,7 +26,7 @@ tape( 'main export is a function', function test( t ) {
1826 t . end ( ) ;
1927} ) ;
2028
21- tape ( 'the plugin successfully lints valid Markdown not containing any equations' , function test ( t ) {
29+ tape ( 'the plugin successfully lints valid Markdown not containing any equations' , opts , function test ( t ) {
2230 var fpath = join ( __dirname , 'fixtures' , 'valid_no_equations.md.txt' ) ;
2331 var file = readSync ( fpath , 'utf8' ) ;
2432
@@ -35,7 +43,7 @@ tape( 'the plugin successfully lints valid Markdown not containing any equations
3543 }
3644} ) ;
3745
38- tape ( 'the plugin successfully lints valid Markdown not containing any equations (string)' , function test ( t ) {
46+ tape ( 'the plugin successfully lints valid Markdown not containing any equations (string)' , opts , function test ( t ) {
3947 remark ( ) . use ( lint ) . process ( '# Beep\n\n## Boop\n' , done ) ;
4048
4149 function done ( error , file ) {
@@ -49,7 +57,7 @@ tape( 'the plugin successfully lints valid Markdown not containing any equations
4957 }
5058} ) ;
5159
52- tape ( 'the plugin successfully lints valid Markdown equations' , function test ( t ) {
60+ tape ( 'the plugin successfully lints valid Markdown equations' , opts , function test ( t ) {
5361 var fpath = join ( __dirname , 'fixtures' , 'valid.md.txt' ) ;
5462 var file = readSync ( fpath , 'utf8' ) ;
5563
@@ -66,7 +74,7 @@ tape( 'the plugin successfully lints valid Markdown equations', function test( t
6674 }
6775} ) ;
6876
69- tape ( 'the plugin successfully lints valid Markdown equations (multiple)' , function test ( t ) {
77+ tape ( 'the plugin successfully lints valid Markdown equations (multiple)' , opts , function test ( t ) {
7078 var fpath = join ( __dirname , 'fixtures' , 'valid_multiple.md.txt' ) ;
7179 var file = readSync ( fpath , 'utf8' ) ;
7280
@@ -83,7 +91,7 @@ tape( 'the plugin successfully lints valid Markdown equations (multiple)', funct
8391 }
8492} ) ;
8593
86- tape ( 'the plugin successfully lints valid Markdown equations (with equation image)' , function test ( t ) {
94+ tape ( 'the plugin successfully lints valid Markdown equations (with equation image)' , opts , function test ( t ) {
8795 var fpath = join ( __dirname , 'fixtures' , 'valid_with_img.md.txt' ) ;
8896 var file = readSync ( fpath , 'utf8' ) ;
8997
@@ -100,7 +108,7 @@ tape( 'the plugin successfully lints valid Markdown equations (with equation ima
100108 }
101109} ) ;
102110
103- tape ( 'the plugin returns a lint error if an equation element is missing a `label` attribute' , function test ( t ) {
111+ tape ( 'the plugin returns a lint error if an equation element is missing a `label` attribute' , opts , function test ( t ) {
104112 var fpath = join ( __dirname , 'fixtures' , 'missing_label.md.txt' ) ;
105113 var file = readSync ( fpath , 'utf8' ) ;
106114
@@ -118,7 +126,7 @@ tape( 'the plugin returns a lint error if an equation element is missing a `labe
118126 }
119127} ) ;
120128
121- tape ( 'the plugin returns a lint error if an equation element is missing an `alt` attribute' , function test ( t ) {
129+ tape ( 'the plugin returns a lint error if an equation element is missing an `alt` attribute' , opts , function test ( t ) {
122130 var fpath = join ( __dirname , 'fixtures' , 'missing_alternate_text.md.txt' ) ;
123131 var file = readSync ( fpath , 'utf8' ) ;
124132
@@ -136,7 +144,7 @@ tape( 'the plugin returns a lint error if an equation element is missing an `alt
136144 }
137145} ) ;
138146
139- tape ( 'the plugin returns a lint error if an equation element is missing a `raw` attribute' , function test ( t ) {
147+ tape ( 'the plugin returns a lint error if an equation element is missing a `raw` attribute' , opts , function test ( t ) {
140148 var fpath = join ( __dirname , 'fixtures' , 'missing_tex_string.md.txt' ) ;
141149 var file = readSync ( fpath , 'utf8' ) ;
142150
@@ -154,7 +162,7 @@ tape( 'the plugin returns a lint error if an equation element is missing a `raw`
154162 }
155163} ) ;
156164
157- tape ( 'the plugin returns a lint error if an equation element is missing a ending comment' , function test ( t ) {
165+ tape ( 'the plugin returns a lint error if an equation element is missing a ending comment' , opts , function test ( t ) {
158166 var fpath = join ( __dirname , 'fixtures' , 'missing_end_comment.md.txt' ) ;
159167 var file = readSync ( fpath , 'utf8' ) ;
160168
@@ -172,7 +180,7 @@ tape( 'the plugin returns a lint error if an equation element is missing a endin
172180 }
173181} ) ;
174182
175- tape ( 'the plugin returns a lint error if an equation element is missing a `label`' , function test ( t ) {
183+ tape ( 'the plugin returns a lint error if an equation element is missing a `label`' , opts , function test ( t ) {
176184 var fpath = join ( __dirname , 'fixtures' , 'empty_label.md.txt' ) ;
177185 var file = readSync ( fpath , 'utf8' ) ;
178186
@@ -190,7 +198,7 @@ tape( 'the plugin returns a lint error if an equation element is missing a `labe
190198 }
191199} ) ;
192200
193- tape ( 'the plugin returns a lint error if an equation element is missing alternate text' , function test ( t ) {
201+ tape ( 'the plugin returns a lint error if an equation element is missing alternate text' , opts , function test ( t ) {
194202 var fpath = join ( __dirname , 'fixtures' , 'empty_alternate_text.md.txt' ) ;
195203 var file = readSync ( fpath , 'utf8' ) ;
196204
@@ -208,7 +216,7 @@ tape( 'the plugin returns a lint error if an equation element is missing alterna
208216 }
209217} ) ;
210218
211- tape ( 'the plugin returns a lint error if an equation element is missing a TeX string' , function test ( t ) {
219+ tape ( 'the plugin returns a lint error if an equation element is missing a TeX string' , opts , function test ( t ) {
212220 var fpath = join ( __dirname , 'fixtures' , 'empty_tex_string.md.txt' ) ;
213221 var file = readSync ( fpath , 'utf8' ) ;
214222
@@ -226,7 +234,7 @@ tape( 'the plugin returns a lint error if an equation element is missing a TeX s
226234 }
227235} ) ;
228236
229- tape ( 'the plugin returns a lint error if an equation element contains invalid TeX' , function test ( t ) {
237+ tape ( 'the plugin returns a lint error if an equation element contains invalid TeX' , opts , function test ( t ) {
230238 var fpath = join ( __dirname , 'fixtures' , 'invalid_equation.md.txt' ) ;
231239 var file = readSync ( fpath , 'utf8' ) ;
232240
0 commit comments