From 3bd960354e47d6f56d722039a93ef2413ed3206c Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Thu, 31 Jul 2025 23:14:00 +0200 Subject: [PATCH] test(no-multiple-template-root): make tests more strict --- tests/lib/rules/no-multiple-template-root.js | 135 ++++++++++++++++--- 1 file changed, 117 insertions(+), 18 deletions(-) diff --git a/tests/lib/rules/no-multiple-template-root.js b/tests/lib/rules/no-multiple-template-root.js index c52c1c202..8df286804 100644 --- a/tests/lib/rules/no-multiple-template-root.js +++ b/tests/lib/rules/no-multiple-template-root.js @@ -128,42 +128,106 @@ ruleTester.run('no-multiple-template-root', rule, { { filename: 'test.vue', code: '', - errors: ['The template root requires exactly one element.'] + errors: [ + { + message: 'The template root requires exactly one element.', + line: 1, + column: 22, + endLine: 1, + endColumn: 33 + } + ] }, { filename: 'test.vue', code: '', - errors: ['The template root requires exactly one element.'] + errors: [ + { + message: 'The template root requires exactly one element.', + line: 3, + column: 5, + endLine: 3, + endColumn: 16 + } + ] }, { filename: 'test.vue', code: '', - errors: ['The template root requires an element rather than texts.'] + errors: [ + { + message: 'The template root requires an element rather than texts.', + line: 1, + column: 11, + endLine: 1, + endColumn: 20 + } + ] }, { filename: 'test.vue', code: '', - errors: ['The template root requires an element rather than texts.'] + errors: [ + { + message: 'The template root requires an element rather than texts.', + line: 1, + column: 22, + endLine: 1, + endColumn: 28 + } + ] }, { filename: 'test.vue', code: '', - errors: ['The template root requires an element rather than texts.'] + errors: [ + { + message: 'The template root requires an element rather than texts.', + line: 1, + column: 11, + endLine: 1, + endColumn: 17 + } + ] }, { filename: 'test.vue', code: '', - errors: ["The template root disallows 'v-for' directives."] + errors: [ + { + message: "The template root disallows 'v-for' directives.", + line: 1, + column: 11, + endLine: 1, + endColumn: 34 + } + ] }, { filename: 'test.vue', code: '', - errors: ["The template root disallows '' elements."] + errors: [ + { + message: "The template root disallows '' elements.", + line: 1, + column: 11, + endLine: 1, + endColumn: 17 + } + ] }, { filename: 'test.vue', code: '', - errors: ["The template root disallows '