filer/tests/spec/fs.spec.js

25 lines
602 B
JavaScript

define(["Filer", "util"], function(Filer, util) {
describe("fs", function() {
beforeEach(util.setup);
afterEach(util.cleanup);
it("is an object", function() {
var fs = util.fs();
expect(typeof fs).to.equal('object');
expect(fs).to.be.an.instanceof(Filer.FileSystem);
});
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;
expect(result.type).to.equal('DIRECTORY');
done();
});
});
});
});