Skip to content

Commit

Permalink
Merge pull request #49 from codemod-com/fix_tests_codemods/react-rout…
Browse files Browse the repository at this point in the history
…er/6_codemods

fix(codemods/react-router/6): update test fixtures for multiple codemods
  • Loading branch information
alexbit-codemod authored Jan 20, 2025
2 parents 1615c6d + 5706aa8 commit d7e74a5
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions codemods/react-router/6/remove-active-classname/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ const __dirname = fileURLToPath(new URL(".", import.meta.url));

describe("react-router v6 remove-active-classname", () => {
it("should remove activeClassName", async () => {
const input = await readFile(join(__dirname, "input.js"), {
const input = await readFile(join(__dirname, "../__testfixtures__/input.js"), {
encoding: "utf8",
});

const output = await readFile(join(__dirname, "output.js"), {
const output = await readFile(join(__dirname, "../__testfixtures__/output.js"), {
encoding: "utf8",
});

Expand Down
4 changes: 2 additions & 2 deletions codemods/react-router/6/remove-active-style/test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ const __dirname = fileURLToPath(new URL(".", import.meta.url));

describe("react-router v6 remove-active-style", () => {
it("should remove activeClassName", async () => {
const input = await readFile(join(__dirname, "input.js"), {
const input = await readFile(join(__dirname, "../__testfixtures__/input.js"), {
encoding: "utf8",
});

const output = await readFile(join(__dirname, "output.js"), {
const output = await readFile(join(__dirname, "../__testfixtures__/output.js"), {
encoding: "utf8",
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ const __dirname = fileURLToPath(new URL(".", import.meta.url));

describe("react-router v6 remove-redirect-inside-switch", () => {
it("should remove Redirect inside Switch", async () => {
const input = await readFile(join(__dirname, "input.js"), {
const input = await readFile(join(__dirname, "../__testfixtures__/input.js"), {
encoding: "utf8",
});

const output = await readFile(join(__dirname, "output.js"), {
const output = await readFile(join(__dirname, "../__testfixtures__/output.js"), {
encoding: "utf8",
});

Expand Down

0 comments on commit d7e74a5

Please sign in to comment.