Skip to content

Commit

Permalink
test: πŸ’ add OPFS to demo tests
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Jun 19, 2023
1 parent bc3b90b commit 2548678
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions demo/fsa-to-node-sync-tests/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,15 @@ const main = async () => {
const dir = await (window as any).showDirectoryPicker({id: 'demo', mode: 'readwrite'});
await demo(dir);
};

const button2 = document.createElement("button");
button2.textContent = "Run tests in OPFS";
button2.style.marginLeft = '1em';
document.body.appendChild(button2);
button2.onclick = async () => {
const dir = await navigator.storage.getDirectory();
await demo(dir as any);
};
};

main();

0 comments on commit 2548678

Please sign in to comment.