GT2/GT2-iOS/node_modules/hasbin/test/unit/mock/fs.js

18 lines
339 B
JavaScript

'use strict';
var sinon = require('sinon');
var fs = module.exports = {
stat: sinon.stub(),
statSync: sinon.stub(),
mockStatIsFile: {
isFile: sinon.stub().returns(true)
},
mockStatIsNotFile: {
isFile: sinon.stub().returns(false)
}
};
fs.stat.yieldsAsync(null, fs.mockStatIsNotFile);
fs.statSync.returns(fs.mockStatIsNotFile);