forked from svrjs/svrjs
Lint out the static file serving and directory listing middleware test script
This commit is contained in:
parent
53dac33694
commit
de7d804ca0
1 changed files with 3 additions and 3 deletions
|
@ -198,7 +198,7 @@ describe("Static file serving and directory listings middleware", () => {
|
||||||
cb(null, {
|
cb(null, {
|
||||||
isDirectory: () => false,
|
isDirectory: () => false,
|
||||||
isFile: () => true,
|
isFile: () => true,
|
||||||
size: 9
|
size: 9,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -229,7 +229,7 @@ describe("Static file serving and directory listings middleware", () => {
|
||||||
destStream.end("mock data");
|
destStream.end("mock data");
|
||||||
}
|
}
|
||||||
return destStream;
|
return destStream;
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
fs.createReadStream.mockImplementation(() => {
|
fs.createReadStream.mockImplementation(() => {
|
||||||
|
@ -240,5 +240,5 @@ describe("Static file serving and directory listings middleware", () => {
|
||||||
|
|
||||||
expect(res.statusCode).toBe(200);
|
expect(res.statusCode).toBe(200);
|
||||||
expect(res._getData()).toBe("mock data");
|
expect(res._getData()).toBe("mock data");
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
|
|
Reference in a new issue