From fcf4aeb88194f2a0fda8e3726bca5ee97521fb5f Mon Sep 17 00:00:00 2001 From: Narek Hovhannisyan Date: Fri, 3 May 2024 14:29:00 +0400 Subject: [PATCH] test(mocks): fix writefile --- src/__mocks__/fs/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/__mocks__/fs/index.ts b/src/__mocks__/fs/index.ts index 7a139a188..1490a63c4 100644 --- a/src/__mocks__/fs/index.ts +++ b/src/__mocks__/fs/index.ts @@ -60,7 +60,7 @@ export const mkdir = (dirPath: string) => dirPath; export const writeFile = async (pathToFile: string, content: string) => { if (pathToFile === 'reject') { - throw Error('Wrong file path'); + throw new Error('Wrong file path'); } const mockPathToFile = 'mock-pathToFile';