Skip to content

Commit

Permalink
fix(tool): added logging in the writeTool
Browse files Browse the repository at this point in the history
  • Loading branch information
sshivaditya committed Jan 20, 2025
1 parent 512a822 commit 45792fa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/write-file.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@ import { WriteFile } from "../src/tools/write-file";
import { mkdirSync, writeFileSync, readFileSync, rmSync, existsSync } from "fs";
import { join } from "path";
import { tmpdir } from "os";
import { Context } from "../src/types";

describe("WriteFile", () => {
let writeFile: WriteFile;
let testDir: string;
let context: Context;

beforeEach(() => {
writeFile = new WriteFile();
context = {
logger: console,
} as unknown as Context;

writeFile = new WriteFile(context);
testDir = join(tmpdir(), `write-file-test-${Date.now()}`);
mkdirSync(testDir, { recursive: true });
});
Expand Down

0 comments on commit 45792fa

Please sign in to comment.