Skip to content

Commit

Permalink
chore: エラー確認方法が間違ってたので修正
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Jan 23, 2025
1 parent 6b2b949 commit b09ceb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/backend/electron/fileHelper.node.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ describe("writeFileSafely", () => {
});

test("存在しないディレクトリに書き込もうとするとエラー", async () => {
const nonExistentDir = path.join(tmpDir, uuid4(), "subdir");
const nonExistentDir = path.join(tmpDir, uuid4(), "not-exist");
const filePath = path.join(nonExistentDir, "test.txt");
await expect(writeFileSafely(filePath, "data")).rejects.toThrow();
expect(() => writeFileSafely(filePath, "data")).toThrow();
});
});

0 comments on commit b09ceb1

Please sign in to comment.