mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
686 B
686 B
Suggest using toBeUndefined()
(prefer-to-be-undefined
)
In order to have a better failure message, toBeUndefined()
should be used upon
asserting expections 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();