You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constfs=createSyncFileSystem(makeVirtualFileSystem());fs.writeFile("index.html","hallo");fs.writeFile("index2.html","hallo");createEffect(()=>fs.readFile("index.html"));test("index.html");test("index2.html");functiontest(path: string){try{fs.rm(path)constresult=fs.readFile(path);console.error(`FAILURE ${path}: Expected throw but received "${result}"`);}catch(error){console.log(`SUCCESS ${path}`);}}
Currently
the test for index.html will fail, because it received "hallo" from fs.readFile
the test for index2.html will succeed, because fs.readFile threw
Reading the file in an effect seems to cause the file to not be cleaned up when being removed.