@@ -10,21 +10,21 @@ const process = (html, options, log = false) => {
10
10
. then ( result => log ? console . log ( result . html ) : clean ( result . html ) )
11
11
}
12
12
13
- test ( 'Skip if config or parameters missing' , async t => {
13
+ test ( 'Skip if config or parameters missing' , async ( ) => {
14
14
const html = await process ( '<a href="https://example.com">Test</a>' )
15
15
16
16
expect ( html ) . toEqual ( '<a href="https://example.com">Test</a>' )
17
17
} )
18
18
19
- test ( 'Skip if invalid URL (`strict` enabled)' , async t => {
19
+ test ( 'Skip if invalid URL (`strict` enabled)' , async ( ) => {
20
20
const html = await process ( '<a href="undefined">Test</a>' , {
21
21
parameters : { foo : 'bar' }
22
22
} )
23
23
24
24
expect ( html ) . toEqual ( '<a href="undefined">Test</a>' )
25
25
} )
26
26
27
- test ( 'Apply to invalid URL (`strict` disabled)' , async t => {
27
+ test ( 'Apply to invalid URL (`strict` disabled)' , async ( ) => {
28
28
const html = await process ( '<a href="undefined">Test</a>' , {
29
29
parameters : { foo : 'bar' } ,
30
30
strict : false
@@ -33,15 +33,15 @@ test('Apply to invalid URL (`strict` disabled)', async t => {
33
33
expect ( html ) . toEqual ( '<a href="undefined?foo=bar">Test</a>' )
34
34
} )
35
35
36
- test ( 'Adds parameters to a[href] attribute value' , async t => {
36
+ test ( 'Adds parameters to a[href] attribute value' , async ( ) => {
37
37
const html = await process ( '<a href="https://example.com">Test</a>' , {
38
38
parameters : { foo : 'bar' , baz : 'qux' }
39
39
} )
40
40
41
41
expect ( html ) . toEqual ( '<a href="https://example.com?baz=qux&foo=bar">Test</a>' )
42
42
} )
43
43
44
- test ( 'URL with special characters' , async t => {
44
+ test ( 'URL with special characters' , async ( ) => {
45
45
const html = await process ( '<a href="https://example.com/{{ var }}?foo=bar">Test</a>' , {
46
46
parameters : { bar : 'baz' } ,
47
47
strict : false
@@ -50,7 +50,7 @@ test('URL with special characters', async t => {
50
50
expect ( html ) . toEqual ( '<a href="https://example.com/{{ var }}?bar=baz&foo=bar">Test</a>' )
51
51
} )
52
52
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 ( ) => {
54
54
const html = await process ( '<a href="https://example.com">Test</a>' , {
55
55
qs : { encode : false } ,
56
56
parameters : { foo : '@Bar@' }
@@ -59,7 +59,7 @@ test('Does not encode parameters if `encode` option is false', async t => {
59
59
expect ( html ) . toEqual ( '<a href="https://example.com?foo=@Bar@">Test</a>' )
60
60
} )
61
61
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 ( ) => {
63
63
const html = await process ( '<a href="https://example.com">Test</a>' , {
64
64
qs : { sort : false } ,
65
65
parameters : { foo : 'bar' , baz : 'qux' }
@@ -68,15 +68,15 @@ test('Does not sort parameters if `sort` option is false', async t => {
68
68
expect ( html ) . toEqual ( '<a href="https://example.com?foo=bar&baz=qux">Test</a>' )
69
69
} )
70
70
71
- test ( 'Appends new parameters to existing parameters' , async t => {
71
+ test ( 'Appends new parameters to existing parameters' , async ( ) => {
72
72
const html = await process ( '<a href="https://example.com?s=test">Test</a>' , {
73
73
parameters : { foo : 'bar' , baz : 'qux' }
74
74
} )
75
75
76
76
expect ( html ) . toEqual ( '<a href="https://example.com?baz=qux&foo=bar&s=test">Test</a>' )
77
77
} )
78
78
79
- test ( 'Processes only tags provided in the `tags` option' , async t => {
79
+ test ( 'Processes only tags provided in the `tags` option' , async ( ) => {
80
80
const html = await process (
81
81
`<a href="https://example.com">Test</a>
82
82
<a href="https://skip.me">Skip</a>
@@ -94,7 +94,7 @@ test('Processes only tags provided in the `tags` option', async t => {
94
94
<module href="https://example.com/header.html"></module>` )
95
95
} )
96
96
97
- test ( 'Adds parameters to known attribute values' , async t => {
97
+ test ( 'Adds parameters to known attribute values' , async ( ) => {
98
98
const html = await process ( `
99
99
<img src="https://example.com/image.jpg">
100
100
<video poster="https://example.com/poster.jpg"></video>
@@ -109,7 +109,7 @@ test('Adds parameters to known attribute values', async t => {
109
109
<table><td background="https://example.com/image.jpg?baz=qux&foo=bar"></td></table>` )
110
110
} )
111
111
112
- test ( 'Adds parameters to specified attribute values only' , async t => {
112
+ test ( 'Adds parameters to specified attribute values only' , async ( ) => {
113
113
const html = await process ( `
114
114
<a href="foo.html" data-href="https://example.com">Test</a>
115
115
<img src="image.jpg">
@@ -123,7 +123,7 @@ test('Adds parameters to specified attribute values only', async t => {
123
123
<img src="image.jpg">` )
124
124
} )
125
125
126
- test ( 'Skip if node has no attributes' , async t => {
126
+ test ( 'Skip if node has no attributes' , async ( ) => {
127
127
const html = await process ( '<a>Test</a>' , {
128
128
parameters : { foo : 'bar' } ,
129
129
tags : [ 'a' ]
0 commit comments