Skip to content

Commit

Permalink
Get around mock-fs incompatibility with Node.js 20
Browse files Browse the repository at this point in the history
  • Loading branch information
watson committed Aug 9, 2023
1 parent 65a9dcc commit 460fba9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ describe('fetch', () => {
test('downloads the url to the path', async () => {
await fetch('url', TEMP_FILE);

expect(readFileSync(TEMP_FILE, 'utf8')).toEqual('foobar');
// Hack: We can't use `readFileSync(TEMP_FILE, 'utf8')` because of https://github.com/tschaub/mock-fs/issues/377
expect(readFileSync(TEMP_FILE).toString()).toEqual('foobar');
});

test('returns the md5 hex hash of the http body', async () => {
Expand Down

0 comments on commit 460fba9

Please sign in to comment.