Skip to content

Commit

Permalink
fix custom rule test
Browse files Browse the repository at this point in the history
  • Loading branch information
NFriedo committed Oct 7, 2024
1 parent 53e5fc2 commit f6acc64
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/eslint-plugin-schulcloud/material-icon-imports.unit.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
"use strict";

const { RuleTester } = require("eslint");
const rule = require("./material-icon-imports.js");
const materialIconImportRule = require("./material-icon-imports.js");

global.structuredClone = (value) => {
return JSON.parse(JSON.stringify(value));
};
const ruleTester = new RuleTester({
parserOptions: { ecmaVersion: 2020, sourceType: "module" },
languageOptions: {
ecmaVersion: 2020,
},
});

ruleTester.run("material-icon-imports", rule, {
ruleTester.run("material-icon-imports", materialIconImportRule, {
valid: [
{
code: `import { mdiCheck } from "@icons/material";`,
Expand Down

0 comments on commit f6acc64

Please sign in to comment.