jvilk / BrowserFS

BrowserFS is an in-browser filesystem that emulates the Node JS filesystem API and supports storing and retrieving files from various backends.
Other
3.07k stars 217 forks source link

Run Unit Tests in Node #192

Open jvilk opened 7 years ago

jvilk commented 7 years ago

There is interest in running BrowserFS under Node, and writing backends specifically for Node. The first step to enable these things is to get our unit tests running in Node to facilitate testing these new backends.

billiegoose commented 6 years ago

I'm now indirectly working on this. I want to port my Jest unit tests for isomorphic-git to a framework that can run in the browser.

I'm currently using jest-fixtures to copy fixture directories to a temporary directory for each unit test. (That causes its own problems... I get a small but regular number of test failures due to Windows file system just being grumpy.) In order to do fixtures in the browser, I plan to use serve up the files with karma's static file option and use BrowserFS's HTTPRequest backend to mount the test fixtures.

In order for the exact same unit tests to work in Node, my plan is to ALSO use BrowserFS to mount test fixtures in Node, but using the FolderAdapter backend. We'll see how it goes.

james-pre commented 11 months ago

Please use https://github.com/browser-fs/core/issues/8