Comment

Comment by rikkus

I like to be able to inject a 'filesystem' object into code for testing, so as not to have to use a real filesystem. This doesn't look like it supports that, which is a shame.

My other tactic is to create a temp directory at the start of a test and do _everything_ within it, then clean it up at the end.

Any other ideas on how to write testable code which uses this filesystem API?

parent rikkus 12 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton