{"repo":"privatenumber/fs-fixture","free":true,"listed":false,"github":"https://github.com/privatenumber/fs-fixture","clone":"git clone https://github.com/privatenumber/fs-fixture.git","description":"Simple API to create test fixtures on disk","language":"TypeScript","stars":98,"topics":["fixture","fs","test","utility","json","object","template"],"license":"MIT","category":"saas-starters-boilerplates","readme_excerpt":"fs-fixture Simple API to create disposable test fixtures on disk. Tiny ( 1.1 kB gzipped) with zero dependencies! Features - 📁 Create files & directories from simple objects - 🧹 Automatic cleanup with using keyword - 📝 Built-in JSON read/write support - 🔗 Symlink support - 💾 Binary file support with Buffers - 🎯 TypeScript-first with full type safety - 🔄 File methods inherit types directly from Node.js fs module - 🔌 Pluggable filesystem — use with @platformatic/vfs, memfs, or any fs/promises -compatible API Installation Quick start Auto cleanup with using keyword Uses TypeScript 5.2+ Explicit Resource Management for automatic cleanup: Already a sponsor? Join the discussion in the Development repo ! Usage Creating fixtures From an object: From a template directory: Empty fixture: Working with files File methods ( readFile , writeFile , readdir ) inherit their type signatures directly from Node.js fs/promises , preserving all overloads and type narrowing behavior. Read files: Write files: JSON operations: Working with directories Advanced features Dynamic content with functions: Symlinks: Binary files: Path syntax: [!TIP] Path syntax also works for grouped prefixes, so you can keep related files together without repeating the shared path: Custom filesystem Pass any fs/promises -compatible API via the fs option to use a virtual filesystem instead of disk: Works with any library that implements the fs/promises API shape, including @platformatic/vfs, the future node:vfs , an","default_branch":null,"files":null,"tree":[],"storefront":"/r/privatenumber","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/privatenumber/fs-fixture/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}