Submit
Path:
~
/
/
usr
/
share
/
grafana
/
public
/
app
/
features
/
search
/
page
/
File Content:
selection.test.ts
import { newSearchSelection, updateSearchSelection } from './selection'; describe('Search selection helper', () => { it('simple dashboard selection', () => { let sel = newSearchSelection(); expect(sel.isSelected('dash', 'aaa')).toBe(false); sel = updateSearchSelection(sel, true, 'dash', ['aaa']); expect(sel.isSelected('dash', 'aaa')).toBe(true); expect(sel.isSelected('dash', '*')).toBeTruthy(); expect(sel.isSelected('alert', '*')).toBeFalsy(); expect(sel.isSelected('*', '*')).toBeTruthy(); sel = updateSearchSelection(sel, false, 'dash', ['aaa']); expect(sel.isSelected('dash', 'aaa')).toBe(false); expect(sel.items).toMatchInlineSnapshot(`Map {}`); expect(sel.isSelected('*', '*')).toBeFalsy(); }); });
Edit
Rename
Chmod
Delete
FILE
FOLDER
INFO
Name
Size
Permission
Action
components
---
0755
reporting.ts
1801 bytes
0644
selection.test.ts
760 bytes
0644
selection.ts
1675 bytes
0644
N4ST4R_ID | Naxtarrr