Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 59cfbd2

Browse files
committed
Fix rule test properties order
1 parent ccfebdf commit 59cfbd2

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

tests/get-attribute.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,36 +21,37 @@ ruleTester.run('get-attribute', rule, {
2121
invalid: [
2222
{
2323
code: "el.getAttribute('SRC')",
24+
output: "el.getAttribute('src')",
2425
errors: [
2526
{
2627
message: 'Attributes should be lowercase and hyphen separated, or part of the SVG whitelist.',
2728
type: 'Literal'
2829
}
29-
],
30-
output: "el.getAttribute('src')"
30+
]
3131
},
3232
{
3333
code: "el.hasAttribute('SRC')",
34+
output: "el.hasAttribute('src')",
3435
errors: [
3536
{
3637
message: 'Attributes should be lowercase and hyphen separated, or part of the SVG whitelist.',
3738
type: 'Literal'
3839
}
39-
],
40-
output: "el.hasAttribute('src')"
40+
]
4141
},
4242
{
4343
code: "el.getAttribute('onClick')",
44+
output: "el.getAttribute('onclick')",
4445
errors: [
4546
{
4647
message: 'Attributes should be lowercase and hyphen separated, or part of the SVG whitelist.',
4748
type: 'Literal'
4849
}
49-
],
50-
output: "el.getAttribute('onclick')"
50+
]
5151
},
5252
{
5353
code: "el.getAttribute('viewbox')",
54+
output: null,
5455
errors: [
5556
{
5657
message: 'Attributes should be lowercase and hyphen separated, or part of the SVG whitelist.',
@@ -60,6 +61,7 @@ ruleTester.run('get-attribute', rule, {
6061
},
6162
{
6263
code: "el.getAttribute('preserveaspectratio')",
64+
output: null,
6365
errors: [
6466
{
6567
message: 'Attributes should be lowercase and hyphen separated, or part of the SVG whitelist.',

tests/no-innerText.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ ruleTester.run('no-innerText', rule, {
1515
invalid: [
1616
{
1717
code: 'document.createElement("js-flash-text").innerText = "foo"',
18+
output: 'document.createElement("js-flash-text").textContent = "foo"',
1819
errors: [
1920
{
2021
message: 'Prefer textContent to innerText',
2122
type: 'Identifier'
2223
}
23-
],
24-
output: 'document.createElement("js-flash-text").textContent = "foo"'
24+
]
2525
},
2626
{
2727
code: 'document.querySelector("js-flash-text").innerText = "bar"',
28+
output: 'document.querySelector("js-flash-text").textContent = "bar"',
2829
errors: [
2930
{
3031
message: 'Prefer textContent to innerText',
3132
type: 'Identifier'
3233
}
33-
],
34-
output: 'document.querySelector("js-flash-text").textContent = "bar"'
34+
]
3535
}
3636
]
3737
})

0 commit comments

Comments
 (0)