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
In OriginPrivateFileSystemStorage.load I am calling fileHandle.getFile()4. The expectation is that this function4 returns Promise<File>. Promise<File> was returned but the .text()5 method on File6 seems not to be properly implemented..
Cause
In my test I am using
nodeToFsa
1 in order to 'mock' the Origin Private File System (OPFS)2 API's that are available in the browser.Application logic and tests can be found here.3
In
OriginPrivateFileSystemStorage.load
I am callingfileHandle.getFile()
4. The expectation is that this function4 returnsPromise<File>
.Promise<File>
was returned but the.text()
5 method onFile
6 seems not to be properly implemented..Reproduction
$ git checkout feature/NLD-264-opfs-memfs-issue
$ npm ci
$ npm run test -- src/storage/OriginPrivateFileSystemStorage.spec.ts
Versions
Footnotes
https://github.com/streamich/memfs/blob/master/docs/fsa/fs-to-fsa.md ↩
https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system ↩
https://gitlab.com/toegang-voor-iedereen/frontend/editor-app/-/merge_requests/260 ↩
https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle/getFile ↩ ↩2
https://developer.mozilla.org/en-US/docs/Web/API/Blob/text ↩
https://developer.mozilla.org/en-US/docs/Web/API/File#instance_methods ↩
The text was updated successfully, but these errors were encountered: