mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
This commit is contained in:
parent
56c8c2ef24
commit
623783b731
2 changed files with 4 additions and 1 deletions
|
@ -7,6 +7,9 @@
|
|||
import { matchContainerName } from '../../utils/symbol_utils';
|
||||
|
||||
describe('matchSymbolName', () => {
|
||||
it('should match symbol whose name is exactly the container name', () => {
|
||||
expect(matchContainerName('Session', 'Session')).toBe(true);
|
||||
});
|
||||
it('should match symbol that has type annotation', () => {
|
||||
expect(matchContainerName('Session', 'Session<key, value>')).toBe(true);
|
||||
});
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
*/
|
||||
|
||||
export const matchContainerName = (containerName: string, symbolName: string) =>
|
||||
new RegExp(`^${containerName}[[<(].*[>)]]?$`).test(symbolName);
|
||||
new RegExp(`^${containerName}([<(].*[>)])?$`).test(symbolName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue