Skip to content

Commit

Permalink
chore: mockfs broken on node v20.5+
Browse files Browse the repository at this point in the history
Implementing the workaround mentioned in the linked issue.

re tschaub/mock-fs#377
  • Loading branch information
corymhall committed Aug 17, 2023
1 parent 085ea80 commit 5e9499f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function loadLiterateSource(directory: string, literateFileName: string) {
// This couldn't really happen in practice, but do the check anyway
throw new Error(`Sample uses literate source ${literateFileName}, but not found: ${fullPath}`);
}
return fs.readFileSync(fullPath, { encoding: 'utf-8' });
return fs.readFileSync(fullPath).toString('utf-8');
}

/**
Expand Down

0 comments on commit 5e9499f

Please sign in to comment.