Skip to content

Commit 90fa79d

Browse files
armano2michalsnik
authored andcommitted
Add unit test for params in order-in-components (#81)
1 parent d5bd07f commit 90fa79d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/lib/rules/order-in-components.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,23 @@ ruleTester.run('order-in-components', rule, {
273273
message: 'The "name" property should be above the "data" property on line 3.',
274274
line: 16
275275
}]
276+
},
277+
{
278+
filename: 'example.vue',
279+
code: `
280+
export default {
281+
data() {
282+
},
283+
name: 'burger',
284+
test: 'ok'
285+
};
286+
`,
287+
parserOptions: { ecmaVersion: 6, sourceType: 'module' },
288+
options: [{ order: ['data', 'test', 'name'] }],
289+
errors: [{
290+
message: 'The "test" property should be above the "name" property on line 5.',
291+
line: 6
292+
}]
276293
}
277294
]
278295
})

0 commit comments

Comments
 (0)