Skip to content

Commit

Permalink
refactor: clenup
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjastrzebski committed Oct 25, 2023
1 parent 90b2038 commit ebcbab5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/matchers/extend-expect.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ export interface JestNativeMatchers<R> {
toBeSelected(): R;
toBeVisible(): R;
toContainElement(element: ReactTestInstance | null): R;
toHaveAccessibilityValue(expectedValue: AccessibilityValueMatcher): R;
toHaveDisplayValue(expectedValue: TextMatch, options?: TextMatchOptions): R;
toHaveProp(name: string, expectedValue?: unknown): R;
toHaveStyle(style: StyleProp<Style>): R;
toHaveTextContent(expectedText: TextMatch, options?: TextMatchOptions): R;
toHaveAccessibilityValue(expectedValue: AccessibilityValueMatcher): R;
}

// Implicit Jest global `expect`.
Expand Down
4 changes: 2 additions & 2 deletions src/matchers/extend-expect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import { toBePartiallyChecked } from './to-be-partially-checked';
import { toBeSelected } from './to-be-selected';
import { toBeVisible } from './to-be-visible';
import { toContainElement } from './to-contain-element';
import { toHaveAccessibilityValue } from './to-have-accessibility-value';
import { toHaveDisplayValue } from './to-have-display-value';
import { toHaveProp } from './to-have-prop';
import { toHaveStyle } from './to-have-style';
import { toHaveTextContent } from './to-have-text-content';
import { toHaveAccessibilityValue } from './to-have-accessibility-value';

expect.extend({
toBeOnTheScreen,
Expand All @@ -30,9 +30,9 @@ expect.extend({
toBeSelected,
toBeVisible,
toContainElement,
toHaveAccessibilityValue,
toHaveDisplayValue,
toHaveProp,
toHaveStyle,
toHaveTextContent,
toHaveAccessibilityValue,
});
File renamed without changes.
4 changes: 2 additions & 2 deletions src/matchers/to-have-accessibility-value.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function toHaveAccessibilityValue(
) {
checkHostElement(element, toHaveAccessibilityValue, this);

const value = getAccessibilityValue(element);
const receivedValue = getAccessibilityValue(element);

return {
pass: matchAccessibilityValue(element, expectedValue),
Expand All @@ -31,7 +31,7 @@ export function toHaveAccessibilityValue(
} have accessibility value`,
stringify(expectedValue),
'Received element with accessibility value',
stringify(value)
stringify(receivedValue)
);
},
};
Expand Down

0 comments on commit ebcbab5

Please sign in to comment.