1
0
Fork 0
forked from svrjs/svrjs

Lint out the static file serving and directory listing middleware test script

This commit is contained in:
Dorian Niemiec 2024-08-31 20:50:10 +02:00
parent 53dac33694
commit de7d804ca0

View file

@ -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");
}) });
}); });