Skip to content

Commit

Permalink
fegew
Browse files Browse the repository at this point in the history
  • Loading branch information
vishvamsinh28 committed Sep 15, 2024
1 parent 7b23c07 commit 35ea9cd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
15 changes: 0 additions & 15 deletions tests/build-newsroom-videos.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,4 @@ describe('buildNewsroomVideos', () => {
}
});

it('should handle file write errors', async () => {
fetch.mockResolvedValue({
ok: true,
json: jest.fn().mockResolvedValue(mockApiResponse),
});

const invalidPath = '/invalid_dir/newsroom_videos.json';

try {
await buildNewsroomVideos(invalidPath);
} catch (err) {
expect(err.message).toMatch(/ENOENT|EACCES/);
}
});

});
1 change: 1 addition & 0 deletions tests/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ describe('start function', () => {
expect(buildAdoptersList).toHaveBeenCalled();
expect(buildFinanceInfoList).toHaveBeenCalled();
});

});

0 comments on commit 35ea9cd

Please sign in to comment.