pve-eslint/eslint/tests/tools/internal-rules/multiline-comment-style.js
Dominik Csapak eb39fafa4f first commit
includes a (minimal) working wrapper

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-04-06 15:06:03 +02:00

39 lines
876 B
JavaScript

"use strict";
const rule = require("../../../tools/internal-rules/multiline-comment-style");
const { RuleTester } = require("../../../lib/rule-tester");
const ruleTester = new RuleTester();
ruleTester.run("internal-rules/multiline-comment-style", rule, {
valid: [
`
//----------------
// Rule Description
//----------------
`,
`
/*
* Block comment
*/
`,
`
// single-line comment
`
],
invalid: [
{
code: `
// foo
// bar
`,
output: `
/*
* foo
* bar
*/
`,
errors: [{ message: "Expected a block comment instead of consecutive line comments." }]
}
]
});