Fix typecheck error: use non-null assertion after expect(pair).toBeDefined()
This commit is contained in:
@@ -171,7 +171,7 @@ describe("derivePublicForegrounds", () => {
|
||||
);
|
||||
expect(pair, `missing ${name}`).toBeDefined();
|
||||
expect(
|
||||
contrastRatio(pair?.foreground, pair?.background),
|
||||
contrastRatio(pair!.foreground, pair!.background),
|
||||
name,
|
||||
).toBeGreaterThanOrEqual(4.5);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user