BrowserFS icon indicating copy to clipboard operation
BrowserFS copied to clipboard

Run Unit Tests in Node

Open jvilk opened this issue 8 years ago • 2 comments

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.

jvilk avatar Aug 01 '17 04:08 jvilk

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.

billiegoose avatar Jan 25 '18 03:01 billiegoose

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

james-pre avatar Oct 25 '23 00:10 james-pre