Equivalent to calling vitest.expect(arg).toBeNull() while also asserting arg to be null.
vitest.expect(arg).toBeNull()
arg
The variable to be asserted.
undefined.
undefined
arg is null.
const iAmNull: number | null = Math.random() >= 0 ? 10 : null;expectToBeUndefined(iAmNull);expect(iAmNull + 1).toBe(11); // ^ 'iAmNull' is possibly 'null'. Copy
const iAmNull: number | null = Math.random() >= 0 ? 10 : null;expectToBeUndefined(iAmNull);expect(iAmNull + 1).toBe(11); // ^ 'iAmNull' is possibly 'null'.
Equivalent to calling
vitest.expect(arg).toBeNull()
while also assertingarg
to be null.