Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pranshuchittora committed Oct 30, 2023
1 parent 65d9010 commit 9e6789e
Show file tree
Hide file tree
Showing 3 changed files with 1,210 additions and 2,233 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"main": "build/index",
"types": "build/index.d.ts",
"dependencies": {
"chalk": "5.0.1",
"chalk": "5.3.0",
"fs": "^0.0.1-security",
"g-factor": "1.1.0",
"ink": "3.0.8",
Expand Down
6 changes: 3 additions & 3 deletions src/lib/__tests__/removeDir.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { removeDir, removeDirBulk } from "../removeDir";
describe("Removes a single file", () => {
test("Removes a file single.temp", () => {
//Remove a file
fs.writeFileSync("single.temp", null);
fs.writeFileSync("single.temp", '');
removeDir("single.temp");
const currentDirArr = fs.readdirSync("./");
expect(currentDirArr.includes("single.temp")).toBe(false);
Expand All @@ -14,8 +14,8 @@ describe("Removes a single file", () => {
describe("Removes files given an array of path", () => {
test("Removes multiple files", () => {
//Remove a file
fs.writeFileSync("single1.temp", null);
fs.writeFileSync("single2.temp", null);
fs.writeFileSync("single1.temp", '');
fs.writeFileSync("single2.temp", '');
removeDirBulk(["single1.temp", "single2.temp"]);
const currentDirArr = fs.readdirSync("./");
expect(
Expand Down
Loading

0 comments on commit 9e6789e

Please sign in to comment.