コード例 #1
0
 it('should call fs.openSync', function() {
   sinon.spy(fs, 'openSync');
   var tmp = new Tempfile;
   tmp.openSync('r');
   fs.openSync.getCall(0).args[0].should.eql(tmp.path);
   fs.openSync.restore();
 });
コード例 #2
0
ファイル: MountFs.js プロジェクト: papandreou/node-mountfs
 }).finally(function () {
     fs.openSync.restore();
     fs.closeSync.restore();
 });
コード例 #3
0
 after(function() {
   fs.openSync.restore();
   fs.closeSync.restore();
 });
コード例 #4
0
ファイル: file.js プロジェクト: vesln/temporary
File.prototype.openSync = function() {
  return fs.openSync.apply(fs, this.prepareArgs(arguments));
};