mapfs
TypeScript icon, indicating that this package has built-in type declarations

7.0.0 • Public • Published

mapfs

A little utility function for easily creating files to help with testing.

Install

npm install mapfs

Example

import { join } from 'path'
import mapfs from 'mapfs'
 
const tmp = join(__dirname, 'tmp')
const cleanup = await mapfs(tmp, {
  'test/test.js': `console.log('test')`
  'a.js': `console.log('a')`
  'b/b.js': `console.log('a')`
})
 
// ...run some tests...
 
// cleanup the created files
await cleanup()

License

MIT

/mapfs/

    Package Sidebar

    Install

    npm i mapfs

    Weekly Downloads

    0

    Version

    7.0.0

    License

    MIT

    Unpacked Size

    4.34 kB

    Total Files

    7

    Last publish

    Collaborators

    • mattmueller