Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

prefer-to-be-undefined.md 688B

Suggest using toBeUndefined() (prefer-to-be-undefined)

In order to have a better failure message, toBeUndefined() should be used upon asserting expectations on undefined value.

Rule details

This rule triggers a warning if toBe(), toEqual() or toStrictEqual() is used to assert an undefined value.

expect(undefined).toBe(undefined);

This rule is enabled by default.

Default configuration

The following patterns are considered warnings:

expect(undefined).toBe(undefined);

expect(undefined).toEqual(undefined);

expect(undefined).toStrictEqual(undefined);

The following pattern is not warning:

expect(undefined).toBeUndefined();