Skip to content

Commit

Permalink
[#46] WIP: Modifying tests, trying to reproduce the issue
Browse files Browse the repository at this point in the history
  • Loading branch information
birdofpreyru committed Jun 12, 2024
1 parent e3a553a commit 42383d3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions example/src/TestBaseMethods.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,14 @@ const tests: { [name: string]: StatusOrEvaluator } = {
const utf8 = '\x47\xC3\x96\xC3\x96\xC3\x90\x0A';
const path = `${TemporaryDirectoryPath}/test-file`;
try {
// NOTE: This is written to ensure that writeFile() overwrites
// existing files (see: https://github.com/birdofpreyru/react-native-fs/issues/46).
await writeFile(
path,
'existing file content ===============================================',
'ascii',
);

await writeFile(path, utf8, 'ascii');
let res = await readFile(path);
if (res !== good) return 'fail';
Expand Down

0 comments on commit 42383d3

Please sign in to comment.