@@ -44,6 +44,10 @@ describe('S5906', () => {
4444 messageId : 'preferSpecificAssertion' ,
4545 suggestions : [ { messageId : 'quickfix' , output } ] ,
4646 } ) ;
47+ const expectedLengthError = ( output : string ) => ( {
48+ messageId : 'preferSpecificLengthAssertion' ,
49+ suggestions : [ { messageId : 'quickfix' , output } ] ,
50+ } ) ;
4751
4852 ruleTester . run ( 'prefer-specific-assertions' , rule , {
4953 valid : [
@@ -184,7 +188,7 @@ describe('S5906', () => {
184188 ` ,
185189 filename : modernJasmineFixture ,
186190 errors : [
187- expectedError ( `
191+ expectedLengthError ( `
188192 import { expect } from 'jasmine';
189193
190194 expect(items).toHaveSize(3);
@@ -199,7 +203,7 @@ describe('S5906', () => {
199203 ` ,
200204 filename : mixedJasmineJestFixture ,
201205 errors : [
202- expectedError ( `
206+ expectedLengthError ( `
203207 import { expect } from 'jasmine';
204208
205209 expect(items).toHaveSize(3);
@@ -237,7 +241,7 @@ describe('S5906', () => {
237241 });
238242 ` ,
239243 errors : [
240- expectedError ( `
244+ expectedLengthError ( `
241245 import { expect, test } from 'vitest';
242246
243247 test('uses generic length assertion', () => {
@@ -254,7 +258,7 @@ describe('S5906', () => {
254258 ` ,
255259 filename : mixedJasmineJestFixture ,
256260 errors : [
257- expectedError ( `
261+ expectedLengthError ( `
258262 import { expect } from 'vitest';
259263
260264 expect(items).toHaveLength(3);
@@ -338,7 +342,7 @@ describe('S5906', () => {
338342 expect(items.length === 2).toBe(true);
339343 ` ,
340344 errors : [
341- expectedError ( `
345+ expectedLengthError ( `
342346 import { expect } from 'vitest';
343347
344348 expect(items).toHaveLength(2);
@@ -352,7 +356,7 @@ describe('S5906', () => {
352356 expect(items.length === 2).toBe(true);
353357 ` ,
354358 errors : [
355- expectedError ( `
359+ expectedLengthError ( `
356360 import { expect } from 'jasmine';
357361
358362 expect(items).toHaveSize(2);
0 commit comments