diff --git a/CHANGELOG.md b/CHANGELOG.md index 501a38543b..446f018397 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - [#5540](https://github.com/blockscout/blockscout/pull/5540) - Tx page: scroll to selected tab's data ### Fixes +- [#5567](https://github.com/blockscout/blockscout/pull/5567) - Sanitize token name and symbol before insert into DB, display in the application - [#5564](https://github.com/blockscout/blockscout/pull/5564) - Add fallback clauses to `string_to_..._hash` functions - [#5538](https://github.com/blockscout/blockscout/pull/5538) - Fix internal transaction's tile bug diff --git a/apps/block_scout_web/assets/__tests__/lib/autocomplete.js b/apps/block_scout_web/assets/__tests__/lib/autocomplete.js new file mode 100644 index 0000000000..877474c927 --- /dev/null +++ b/apps/block_scout_web/assets/__tests__/lib/autocomplete.js @@ -0,0 +1,31 @@ +/** + * @jest-environment jsdom + */ + + import { searchEngine } from '../../js/lib/autocomplete' + + test('searchEngine', () => { + expect(searchEngine('qwe', { + 'name': 'Test', + 'symbol': 'TST', + 'address_hash': '0x000', + 'tx_hash': '0x000', + 'block_hash': '0x000' + })).toEqual(undefined) + + expect(searchEngine('tes', { + 'name': 'Test', + 'symbol': 'TST', + 'address_hash': '0x000', + 'tx_hash': '0x000', + 'block_hash': '0x000' + })).toEqual('