Skip to content

Commit 0e1c20c

Browse files
author
The Ult
committed
fix(angular): resolve lint errors in utils.test.ts
Replace explicit null/undefined literals with typed variables to satisfy unicorn/no-null and unicorn/no-useless-undefined rules.
1 parent b719b82 commit 0e1c20c

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

packages/angular/src/utils.test.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,8 @@ describe('isPrimitiveType', () => {
299299
);
300300

301301
it('returns false for undefined', () => {
302-
expect(isPrimitiveType(undefined)).toBe(false);
302+
const value = undefined as string | undefined;
303+
expect(isPrimitiveType(value)).toBe(false);
303304
});
304305
});
305306

@@ -315,11 +316,14 @@ describe('isDefined', () => {
315316
});
316317

317318
it('returns false for null', () => {
318-
expect(isDefined(null)).toBe(false);
319+
// eslint-disable-next-line unicorn/no-null -- testing null handling explicitly
320+
const value = null as string | null;
321+
expect(isDefined(value)).toBe(false);
319322
});
320323

321324
it('returns false for undefined', () => {
322-
expect(isDefined(undefined)).toBe(false);
325+
const value = undefined as string | undefined;
326+
expect(isDefined(value)).toBe(false);
323327
});
324328
});
325329

@@ -358,7 +362,8 @@ describe('isZodSchemaOutput', () => {
358362
});
359363

360364
it('returns false when schemas is undefined', () => {
361-
expect(isZodSchemaOutput(makeOutput(undefined))).toBe(false);
365+
const value = undefined as unknown;
366+
expect(isZodSchemaOutput(makeOutput(value))).toBe(false);
362367
});
363368
});
364369

0 commit comments

Comments
 (0)