From 94c4ff6df9bffc319e40d440ef6f9bdfb2eacde1 Mon Sep 17 00:00:00 2001 From: Ulrich Stark Date: Sun, 25 May 2025 20:26:40 +0200 Subject: [PATCH 1/2] fix(no-large-snapshosts): fix incorrect noSnapshot message --- src/rules/no-large-snapshots.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rules/no-large-snapshots.ts b/src/rules/no-large-snapshots.ts index a33484628..d2a47f1b2 100644 --- a/src/rules/no-large-snapshots.ts +++ b/src/rules/no-large-snapshots.ts @@ -79,7 +79,8 @@ export default createRule<[RuleOptions], MessageId>({ description: 'Disallow large snapshots', }, messages: { - noSnapshot: '`{{ lineCount }}`s should begin with lowercase', + noSnapshot: + 'Expected to not encounter a Jest snapshot but was found with {{ lineCount }} lines long', tooLongSnapshots: 'Expected Jest snapshot to be smaller than {{ lineLimit }} lines but was {{ lineCount }} lines long', }, From 9cb2c03e0936b4fbb33fd5cefaaccbb9dfa33ab4 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Mon, 26 May 2025 07:04:21 +1200 Subject: [PATCH 2/2] fix(no-large-snapshots): update message --- src/rules/no-large-snapshots.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rules/no-large-snapshots.ts b/src/rules/no-large-snapshots.ts index d2a47f1b2..c9aee9b87 100644 --- a/src/rules/no-large-snapshots.ts +++ b/src/rules/no-large-snapshots.ts @@ -80,7 +80,7 @@ export default createRule<[RuleOptions], MessageId>({ }, messages: { noSnapshot: - 'Expected to not encounter a Jest snapshot but was found with {{ lineCount }} lines long', + 'Expected to not encounter a Jest snapshot but one was found that is {{ lineCount }} lines long', tooLongSnapshots: 'Expected Jest snapshot to be smaller than {{ lineLimit }} lines but was {{ lineCount }} lines long', },