Skip to content

Commit 5ae2cf5

Browse files
committed
Update test
1 parent 17aaf45 commit 5ae2cf5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/focus-first-suggestion/AutosuggestApp.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ export const onSuggestionsClearRequested = sinon.spy(() => {
4141

4242
export const onSuggestionSelected = sinon.spy();
4343

44-
export const onSuggestionHighlighted = sinon.spy();
44+
export const onSuggestionHighlighted = sinon.spy(({ suggestion }) => {
45+
app.setState({
46+
highlightedSuggestion: suggestion
47+
});
48+
});
4549

4650
export default class AutosuggestApp extends Component {
4751
constructor() {
@@ -51,7 +55,8 @@ export default class AutosuggestApp extends Component {
5155

5256
this.state = {
5357
value: '',
54-
suggestions: []
58+
suggestions: [],
59+
highlightedSuggestion: null
5560
};
5661
}
5762

0 commit comments

Comments
 (0)