filer/tests/spec/fs.shell.spec.js

34 lines
763 B
JavaScript
Raw Normal View History

2014-12-17 07:54:29 +00:00
var Filer = require('../..');
var util = require('../lib/test-utils.js');
var expect = require('chai').expect;
describe("fs.Shell", function() {
beforeEach(util.setup);
afterEach(util.cleanup);
it("is a function", function(done) {
var fs = util.fs();
expect(typeof fs.Shell).to.equal('function');
done();
});
it('should return a FileSystemShell instance', function(done) {
var fs = util.fs();
var sh = new fs.Shell();
expect(sh.prototype).to.deep.equal((new Filer.Shell(fs)).prototype);
done();
});
it('should reflect changes to the prototype', function(done){
var fs = util.fs();
var sh = new fs.Shell();
Filer.Shell.prototype.test = "foo";
expect(sh.test).to.equal("foo");
done();
});
});