12333
diff --git a/tests/lib/rules/no-negated-v-if-condition.js b/tests/lib/rules/no-negated-v-if-condition.js
index ee60562ea..0b97c7909 100644
--- a/tests/lib/rules/no-negated-v-if-condition.js
+++ b/tests/lib/rules/no-negated-v-if-condition.js
@@ -149,8 +149,14 @@ tester.run('no-negated-v-if-condition', rule, {
filename: 'test.vue',
code: `
- Content
- Alternative
+ Content
+ Alternative
+
+ `,
+ output: `
+
+ Alternative
+ Content
`,
errors: [
@@ -159,18 +165,7 @@ tester.run('no-negated-v-if-condition', rule, {
line: 3,
column: 20,
endLine: 3,
- endColumn: 24,
- suggestions: [
- {
- messageId: 'fixNegatedCondition',
- output: `
-
- Alternative
- Content
-
- `
- }
- ]
+ endColumn: 24
}
]
},
@@ -178,8 +173,14 @@ tester.run('no-negated-v-if-condition', rule, {
filename: 'test.vue',
code: `
- Negated condition
- Otherwise
+ Negated condition
+ Otherwise
+
+ `,
+ output: `
+
+ Otherwise
+ Negated condition
`,
errors: [
@@ -188,18 +189,7 @@ tester.run('no-negated-v-if-condition', rule, {
line: 3,
column: 20,
endLine: 3,
- endColumn: 33,
- suggestions: [
- {
- messageId: 'fixNegatedCondition',
- output: `
-
- Otherwise
- Negated condition
-
- `
- }
- ]
+ endColumn: 33
}
]
},
@@ -211,24 +201,19 @@ tester.run('no-negated-v-if-condition', rule, {
Equal
`,
+ output: `
+
+ Equal
+ Not equal
+
+ `,
errors: [
{
messageId: 'negatedCondition',
line: 3,
column: 20,
endLine: 3,
- endColumn: 26,
- suggestions: [
- {
- messageId: 'fixNegatedCondition',
- output: `
-
- Equal
- Not equal
-
- `
- }
- ]
+ endColumn: 26
}
]
},
@@ -240,24 +225,45 @@ tester.run('no-negated-v-if-condition', rule, {
Strictly equal
`,
+ output: `
+
+ Strictly equal
+ Strictly not equal
+
+ `,
errors: [
{
messageId: 'negatedCondition',
line: 3,
column: 20,
endLine: 3,
- endColumn: 27,
- suggestions: [
- {
- messageId: 'fixNegatedCondition',
- output: `
+ endColumn: 27
+ }
+ ]
+ },
+ {
+ filename: 'test.vue',
+ code: `
- Strictly equal
- Strictly not equal
+ First
+ Second
+ Default
- `
- }
- ]
+ `,
+ output: `
+
+ First
+ Default
+ Second
+
+ `,
+ errors: [
+ {
+ messageId: 'negatedCondition',
+ line: 4,
+ column: 26,
+ endLine: 4,
+ endColumn: 30
}
]
},
@@ -265,30 +271,49 @@ tester.run('no-negated-v-if-condition', rule, {
filename: 'test.vue',
code: `
- First
- Second
- Default
+ First
+ Second
+ Default
+
+ `,
+ output: `
+
+ First
+ Default
+ Second
`,
errors: [
{
messageId: 'negatedCondition',
line: 4,
- column: 25,
+ column: 26,
endLine: 4,
- endColumn: 29,
- suggestions: [
- {
- messageId: 'fixNegatedCondition',
- output: `
+ endColumn: 28
+ }
+ ]
+ },
+ {
+ filename: 'test.vue',
+ code: `
- First
- Default
- Second
+ div contents
+ span contents
- `
- }
- ]
+ `,
+ output: `
+
+ span contents
+ div contents
+
+ `,
+ errors: [
+ {
+ messageId: 'negatedCondition',
+ line: 3,
+ column: 20,
+ endLine: 3,
+ endColumn: 30
}
]
},
@@ -296,30 +321,49 @@ tester.run('no-negated-v-if-condition', rule, {
filename: 'test.vue',
code: `
- First
- Second
- Default
+
+
Inner if content
+
Inner else content
+
+
+ Nested if content
+ Nested else content
+
+
+ `,
+ output: `
+
+
+ Nested if content
+ Nested else content
+
+
+
Inner if content
+
Inner else content
+
`,
errors: [
+ {
+ messageId: 'negatedCondition',
+ line: 3,
+ column: 20,
+ endLine: 3,
+ endColumn: 26
+ },
{
messageId: 'negatedCondition',
line: 4,
- column: 25,
+ column: 23,
endLine: 4,
- endColumn: 27,
- suggestions: [
- {
- messageId: 'fixNegatedCondition',
- output: `
-
- First
- Default
- Second
-
- `
- }
- ]
+ endColumn: 29
+ },
+ {
+ messageId: 'negatedCondition',
+ line: 8,
+ column: 23,
+ endLine: 8,
+ endColumn: 30
}
]
}
diff --git a/tests/lib/rules/no-parsing-error.js b/tests/lib/rules/no-parsing-error.js
index 54194a7b5..9225e4bda 100644
--- a/tests/lib/rules/no-parsing-error.js
+++ b/tests/lib/rules/no-parsing-error.js
@@ -80,13 +80,11 @@ tester.run('no-parsing-error', rule, {
},
{
code: '