Automate the copying/removing of temporary directories for your tests
Automate the copying/removing of temporary directories for your tape tests.
directory is the directory you want to copy to a temporary folder
for each test. Returns a test decorator that will handle creating and removing
the temporary directories as required:
var betamax = require'betamax'var test = require'tape'var basic = betamax__diraname + '/fixtures/basic'test'basic' basic// The temporary directory is set// as a property on `t`:var directory = tdirectorytend
You might find it simpler to supply
betamax with tape's
test function, which will give you back a modified version to construct your tests with:
var betamax = require'betamax'var tape = require'tape'var test = betamax__dirname + '/fixtures/basic'tape// You can pass tape's `test` method into// betamax to use it directly:test'basic'var directory = tdirectory// test things here...tend
MIT. See LICENSE.md for details.