fix: prevent binding focus NaN value (#6803)
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
This commit is contained in:
@@ -228,3 +228,19 @@ export const togglePopover = (label: string) => {
|
||||
|
||||
UI.clickLabeledElement(label);
|
||||
};
|
||||
|
||||
expect.extend({
|
||||
toBeNonNaNNumber(received) {
|
||||
const pass = typeof received === "number" && !isNaN(received);
|
||||
if (pass) {
|
||||
return {
|
||||
message: () => `expected ${received} not to be a non-NaN number`,
|
||||
pass: true,
|
||||
};
|
||||
}
|
||||
return {
|
||||
message: () => `expected ${received} to be a non-NaN number`,
|
||||
pass: false,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user