Skip to content

Commit

Permalink
test(mocks): fix writefile
Browse files Browse the repository at this point in the history
  • Loading branch information
narekhovhannisyan committed May 3, 2024
1 parent 679fbad commit fcf4aeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/__mocks__/fs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit fcf4aeb

Please sign in to comment.