1.1.0 • Published 9 years ago

kitchenfile v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

kitchenfile

Build Status

Small utility for dealing with files in tests. Only use in tests!

import kitchenfile from 'kitchenfile'

const file = kitchenfile(`${__dirname}/files`)
// or: const file = kitchenfile(__dirname, files)

// Calls to file() are memoized!
file('image.jpg').rs() // returns a readable stream
file('image.jpg').buf // returns a buffer
file('image.jpg').path // path to image.jpg
file('image.jpg').contentType // content type based on file ext (e.g.  image/jpg)
file('image.jpg').size // file size in bytes

Install

npm install --save-dev kitchenfile

Requires Node v6+

Usage

See ./test directory for usage examples.

1.1.0

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago