2018-06-28 23:26:08 +00:00
|
|
|
var Filer = require('../../src');
|
2014-05-23 20:53:50 +00:00
|
|
|
var util = require('../lib/test-utils.js');
|
|
|
|
var expect = require('chai').expect;
|
2013-11-27 17:18:09 +00:00
|
|
|
|
2018-07-15 17:25:35 +00:00
|
|
|
describe('fs', function() {
|
2014-05-23 20:53:50 +00:00
|
|
|
beforeEach(util.setup);
|
|
|
|
afterEach(util.cleanup);
|
2013-11-27 17:18:09 +00:00
|
|
|
|
2018-07-15 17:25:35 +00:00
|
|
|
it('is an object', function() {
|
2014-05-23 20:53:50 +00:00
|
|
|
var fs = util.fs();
|
|
|
|
expect(typeof fs).to.equal('object');
|
|
|
|
expect(fs).to.be.an.instanceof(Filer.FileSystem);
|
|
|
|
});
|
2013-11-27 17:18:09 +00:00
|
|
|
|
2014-05-23 20:53:50 +00:00
|
|
|
it('should have a root directory', function(done) {
|
|
|
|
var fs = util.fs();
|
|
|
|
fs.stat('/', function(error, result) {
|
|
|
|
expect(error).not.to.exist;
|
|
|
|
expect(result).to.exist;
|
2018-11-28 18:54:20 +00:00
|
|
|
expect(result.isDirectory()).to.be.true;
|
2014-05-23 20:53:50 +00:00
|
|
|
done();
|
2013-11-27 17:18:09 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|