@@ -10,21 +10,21 @@ const process = (html, options, log = false) => {
1010 . then ( result => log ? console . log ( result . html ) : clean ( result . html ) )
1111}
1212
13- test ( 'Skip if config or parameters missing' , async t => {
13+ test ( 'Skip if config or parameters missing' , async ( ) => {
1414 const html = await process ( '<a href="https://example.com">Test</a>' )
1515
1616 expect ( html ) . toEqual ( '<a href="https://example.com">Test</a>' )
1717} )
1818
19- test ( 'Skip if invalid URL (`strict` enabled)' , async t => {
19+ test ( 'Skip if invalid URL (`strict` enabled)' , async ( ) => {
2020 const html = await process ( '<a href="undefined">Test</a>' , {
2121 parameters : { foo : 'bar' }
2222 } )
2323
2424 expect ( html ) . toEqual ( '<a href="undefined">Test</a>' )
2525} )
2626
27- test ( 'Apply to invalid URL (`strict` disabled)' , async t => {
27+ test ( 'Apply to invalid URL (`strict` disabled)' , async ( ) => {
2828 const html = await process ( '<a href="undefined">Test</a>' , {
2929 parameters : { foo : 'bar' } ,
3030 strict : false
@@ -33,15 +33,15 @@ test('Apply to invalid URL (`strict` disabled)', async t => {
3333 expect ( html ) . toEqual ( '<a href="undefined?foo=bar">Test</a>' )
3434} )
3535
36- test ( 'Adds parameters to a[href] attribute value' , async t => {
36+ test ( 'Adds parameters to a[href] attribute value' , async ( ) => {
3737 const html = await process ( '<a href="https://example.com">Test</a>' , {
3838 parameters : { foo : 'bar' , baz : 'qux' }
3939 } )
4040
4141 expect ( html ) . toEqual ( '<a href="https://example.com?baz=qux&foo=bar">Test</a>' )
4242} )
4343
44- test ( 'URL with special characters' , async t => {
44+ test ( 'URL with special characters' , async ( ) => {
4545 const html = await process ( '<a href="https://example.com/{{ var }}?foo=bar">Test</a>' , {
4646 parameters : { bar : 'baz' } ,
4747 strict : false
@@ -50,7 +50,7 @@ test('URL with special characters', async t => {
5050 expect ( html ) . toEqual ( '<a href="https://example.com/{{ var }}?bar=baz&foo=bar">Test</a>' )
5151} )
5252
53- test ( 'Does not encode parameters if `encode` option is false' , async t => {
53+ test ( 'Does not encode parameters if `encode` option is false' , async ( ) => {
5454 const html = await process ( '<a href="https://example.com">Test</a>' , {
5555 qs : { encode : false } ,
5656 parameters : { foo : '@Bar@' }
@@ -59,7 +59,7 @@ test('Does not encode parameters if `encode` option is false', async t => {
5959 expect ( html ) . toEqual ( '<a href="https://example.com?foo=@Bar@">Test</a>' )
6060} )
6161
62- test ( 'Does not sort parameters if `sort` option is false' , async t => {
62+ test ( 'Does not sort parameters if `sort` option is false' , async ( ) => {
6363 const html = await process ( '<a href="https://example.com">Test</a>' , {
6464 qs : { sort : false } ,
6565 parameters : { foo : 'bar' , baz : 'qux' }
@@ -68,15 +68,15 @@ test('Does not sort parameters if `sort` option is false', async t => {
6868 expect ( html ) . toEqual ( '<a href="https://example.com?foo=bar&baz=qux">Test</a>' )
6969} )
7070
71- test ( 'Appends new parameters to existing parameters' , async t => {
71+ test ( 'Appends new parameters to existing parameters' , async ( ) => {
7272 const html = await process ( '<a href="https://example.com?s=test">Test</a>' , {
7373 parameters : { foo : 'bar' , baz : 'qux' }
7474 } )
7575
7676 expect ( html ) . toEqual ( '<a href="https://example.com?baz=qux&foo=bar&s=test">Test</a>' )
7777} )
7878
79- test ( 'Processes only tags provided in the `tags` option' , async t => {
79+ test ( 'Processes only tags provided in the `tags` option' , async ( ) => {
8080 const html = await process (
8181 `<a href="https://example.com">Test</a>
8282 <a href="https://skip.me">Skip</a>
@@ -94,7 +94,7 @@ test('Processes only tags provided in the `tags` option', async t => {
9494 <module href="https://example.com/header.html"></module>` )
9595} )
9696
97- test ( 'Adds parameters to known attribute values' , async t => {
97+ test ( 'Adds parameters to known attribute values' , async ( ) => {
9898 const html = await process ( `
9999 <img src="https://example.com/image.jpg">
100100 <video poster="https://example.com/poster.jpg"></video>
@@ -109,7 +109,7 @@ test('Adds parameters to known attribute values', async t => {
109109 <table><td background="https://example.com/image.jpg?baz=qux&foo=bar"></td></table>` )
110110} )
111111
112- test ( 'Adds parameters to specified attribute values only' , async t => {
112+ test ( 'Adds parameters to specified attribute values only' , async ( ) => {
113113 const html = await process ( `
114114 <a href="foo.html" data-href="https://example.com">Test</a>
115115 <img src="image.jpg">
@@ -123,7 +123,7 @@ test('Adds parameters to specified attribute values only', async t => {
123123 <img src="image.jpg">` )
124124} )
125125
126- test ( 'Skip if node has no attributes' , async t => {
126+ test ( 'Skip if node has no attributes' , async ( ) => {
127127 const html = await process ( '<a>Test</a>' , {
128128 parameters : { foo : 'bar' } ,
129129 tags : [ 'a' ]
0 commit comments