PromucFlow_constructor/app/client/packages/eslint-plugin/src/object-keys/rule.test.ts

19 lines
383 B
TypeScript

import { TSESLint } from "@typescript-eslint/utils";
import { objectKeysRule } from "./rule";
const ruleTester = new TSESLint.RuleTester();
ruleTester.run("object-keys", objectKeysRule, {
valid: [
{
code: "objectKeys({ 'a': 'b' })",
},
],
invalid: [
{
code: "Object.keys({ 'a': 'b' })",
errors: [{ messageId: "useObjectKeys" }],
},
],
});