const { getRuleTester } = require("./testHelper");
const rule = require("./export-chain");

const outputTail = "export default {};"; // required to trigger the final check of the rule
getRuleTester().run("export-chain", rule, {
    valid: [getCode("export const chain = [];")],
    invalid: [getCode("const chain = [];", [{ messageId: "exportChain" }], `export const chain = []; ${outputTail}`)],
});
function getCode(code, errors, output) {
    return {
        code: `${code} ${outputTail}`, // required to trigger the final check of the rule
        filename: "c:/modules/client-framework/Handlers/tester.ts",
        errors,
        output,
    };
}
