From ed18fc9fc1ec44aafbb7df82673ae41118b58531 Mon Sep 17 00:00:00 2001 From: Barrie Treloar Date: Fri, 27 Sep 2019 09:56:12 +0930 Subject: [PATCH] Test: add test for stdin file size greater than 4096 --- tests/bin/eslint.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/bin/eslint.js b/tests/bin/eslint.js index b6254fa5ff14..932dd9ec4517 100644 --- a/tests/bin/eslint.js +++ b/tests/bin/eslint.js @@ -163,6 +163,15 @@ describe("bin/eslint.js", () => { return assertExitCode(child, 0); }); }); + + it("successfully handles more than 4k data via stdin", () => { + const child = runESLint(["--stdin", "--no-eslintrc"]); + const large = fs.createReadStream(`${__dirname}/../bench/large.js`, "utf8"); + + large.pipe(child.stdin); + + return assertExitCode(child, 0); + }); }); describe("running on files", () => {