You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-08-09 08:42:50 +03:00
Fix jest/no-conditional-expect lint and enable it (#10307)
This commit is contained in:
committed by
GitHub
parent
2c97cb4054
commit
af1ec76149
@@ -220,8 +220,10 @@ describe("MessageComposer", () => {
|
||||
|
||||
it(`should${value || "not"} display the button`, () => {
|
||||
if (value) {
|
||||
// eslint-disable-next-line jest/no-conditional-expect
|
||||
expect(screen.getByLabelText(buttonLabel)).toBeInTheDocument();
|
||||
} else {
|
||||
// eslint-disable-next-line jest/no-conditional-expect
|
||||
expect(screen.queryByLabelText(buttonLabel)).not.toBeInTheDocument();
|
||||
}
|
||||
});
|
||||
@@ -242,8 +244,10 @@ describe("MessageComposer", () => {
|
||||
|
||||
it(`should${!value || "not"} display the button`, () => {
|
||||
if (!value) {
|
||||
// eslint-disable-next-line jest/no-conditional-expect
|
||||
expect(screen.getByLabelText(buttonLabel)).toBeInTheDocument();
|
||||
} else {
|
||||
// eslint-disable-next-line jest/no-conditional-expect
|
||||
expect(screen.queryByLabelText(buttonLabel)).not.toBeInTheDocument();
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user