Website/node_modules/co-fs-extra/test/index.js
2015-12-02 18:21:44 -05:00

21 lines
529 B
JavaScript

var co = require('co');
var fs = require('..');
var assert = require('assert');
describe('co-fs methods', function () {
it('should be exports', function (done) {
co(function* () {
var ret = yield fs.exists('test/fixtures/msg.json');
assert(true === ret);
})(done);
});
});
describe('fs-extra methods', function () {
it('should be wrapped', function (done) {
co(function* () {
var data = yield fs.readJson('test/fixtures/msg.json');
assert('hello' === data.msg);
})(done);
});
});