Skip to content

new rule: no-multiple-assertions-wait-for #133

@renatoagds

Description

@renatoagds

Following the proposed in Kent at his post (https://kentcdodds.com/blog/common-mistakes-with-react-testing-library). I would like to suggest a new rule that detects multiple expect inside a wait-for:

 // wrong await waitFor(() => { expect(a).toEqual('a') expect(b).toEqual('b') })
 // correct await waitFor(() => expect(a).toEqual('a')) expect(b).toEqual('b')

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions