7.0.0 • Published 5 years ago
mapfs v7.0.0
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