From 73e6d5fb0800eb2740d1b73ec374a5f342c8691a Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sat, 31 Oct 2026 08:57:42 +0100 Subject: [PATCH] =?UTF-8?q?Answer=20stability=20round=202:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1=20(0=20misread);=20pin=20the?= =?UTF-8?q?=20IIFE=20callee=20check=20with=20a=20callback=20argument?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/function-limits.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/function-limits.test.ts b/src/function-limits.test.ts index ec63087..c7d067d 100644 --- a/src/function-limits.test.ts +++ b/src/function-limits.test.ts @@ -115,6 +115,7 @@ test("measure counts lines and complexity as ESLint does", () => { " switch (a) { case 1: break; default: }", " a ||= 2; a &&= 3; a ??= 4;", " b?.();", + " y.map(() => {});", " const inner = () => (a ? 1 : 2);", " const o = { prop() {}, key: function () {} };", " (function () { if (a) {} })();", @@ -122,7 +123,8 @@ test("measure counts lines and complexity as ESLint does", () => { "class K { method() {} }", ].join("\n"); assert.deepEqual(measure(source), [ - { name: "outer", lines: 15, complexity: 16 }, + { name: "outer", lines: 16, complexity: 16 }, + { name: "outer > anonymous", lines: 1, complexity: 1 }, { name: "outer > inner", lines: 1, complexity: 2 }, { name: "outer > prop", lines: 1, complexity: 1 }, { name: "outer > key", lines: 1, complexity: 1 },