Jest · Matcher
toBeNull
toBeNull() checks that a value is exactly null. Use .not.toBeNull() to check that it is not null.
Last updated
Syntax
expect(value).toBeNull()In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
expectnottoBeUndefinedtoBeDefinedtoBeTruthytoBeFalsy