paint-brush
Mocking File System In Node.jsby@sanketmeghani
8,656 reads
8,656 reads

Mocking File System In Node.js

by Sanket Meghani2mJanuary 30th, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Recently I created a command line utility in JavaScript which parses the file system. I was exploring options to write unit tests for the utility. Since the utility looks at the file system (directories and files), one of the option was to create required directories and files using node’s fs module before the tests execution starts and delete them after the tests execution is completed.

Company Mentioned

Mention Thumbnail
featured image - Mocking File System In Node.js
Sanket Meghani HackerNoon profile picture
Sanket Meghani

Sanket Meghani

@sanketmeghani

L O A D I N G
. . . comments & more!

About Author

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite