DenoDDeno
Powered by
Lumphammer (Neil de Carteret)L
Denoβ€’3y agoβ€’
4 replies
Lumphammer (Neil de Carteret)

What's a good way to write tests for a script which does a bunch filesystem wrangling?

As per the title - I have a script which, given a folder, does a bunch of moving and renaming. I'd like to test it, ideally without having to abstract the entire fs away. The last timer I had to do this under Node.js I think I used
mock-fs
mock-fs
, but that works directly with Node's
fs
fs
API. What would be a good approach for doing this in Deno?
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

How to write a new project template script
spaceflounderSspaceflounder / help
3y ago
What is the proper way to write crons in a Fresh project?
vicaryVvicary / help
11mo ago