Archived
1
0

Fix protocol fs test

This commit is contained in:
Asher
2019-04-24 18:15:56 -05:00
parent c9f91e77cd
commit 0de7247868
4 changed files with 30 additions and 11 deletions

View File

@ -21,3 +21,15 @@ Object.defineProperty(fs.read, util.promisify.custom, {
global.requestAnimationFrame = (cb) => {
setTimeout(cb, 0);
};
// lchmod might not be available. Jest runs graceful-fs which makes this a no-op
// when it doesn't exist but that doesn't seem to always run when running
// multiple tests (or maybe it gets undone after a test).
if (!fs.lchmod) {
fs.lchmod = function (path, mode, cb) {
if (cb) {
process.nextTick(cb);
}
};
fs.lchmodSync = function () {};
}