[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(search): arrow up key doesn't trigger search #1774

Merged
merged 3 commits into from
Oct 14, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: fix testcase
  • Loading branch information
bytemain committed Oct 11, 2022
commit 63051dab26dba3e8256700dda04d9a135e53f6db
4 changes: 4 additions & 0 deletions packages/search/__tests__/browser/search-history.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ describe('测试 SearchHistory', () => {
});

test('method: setRecentSearchWord', () => {
const spy = jest.spyOn(searchServiceClient, 'searchDebounce');
searchHistory.setRecentSearchWord();
expect(searchServiceClient.searchValue).toEqual('d');
expect(spy).toHaveBeenCalled();
});

test('method: setRecentSearchWord 前进到底', () => {
Expand All @@ -58,8 +60,10 @@ describe('测试 SearchHistory', () => {
});

test('method: setBackRecentSearchWord', () => {
const spy = jest.spyOn(searchServiceClient, 'searchDebounce');
searchHistory.setBackRecentSearchWord();
expect(searchServiceClient.searchValue).toEqual('b');
expect(spy).toHaveBeenCalled();
});

test('method: setBackRecentSearchWord 后退到底', () => {
Expand Down