Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mvantellingen committed Apr 12, 2024
1 parent 64f7ae1 commit 63a871c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
18 changes: 8 additions & 10 deletions src/parse.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { describe, expect, test } from "vitest"
import { parseSource } from "./parse"

import { describe, expect, test } from "vitest";
import { parseSource } from "./parse";

describe("Test parseSource", () => {

test("should parse source", async () => {
const source = `
"use client";
Expand All @@ -21,13 +19,13 @@ describe("Test parseSource", () => {
<h1>{t("title")}</h1>
</div>
)
`
`;

const result = await parseSource("MyComponent.tsx", source)
const result = await parseSource("MyComponent.tsx", source);
const expected = {
foobar: "",
title: "",
}
expect(result).toEqual(expected)
})
})
};
expect(result).toEqual(expected);
});
});
1 change: 0 additions & 1 deletion src/parse.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { promises as fsPromises } from "fs";
import ts from "typescript";


export async function findTranslationsUsage(filePath: string) {
const fileContent = await fsPromises.readFile(filePath, "utf8");
return parseSource(filePath, fileContent);
Expand Down

0 comments on commit 63a871c

Please sign in to comment.