mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
test fix
Signed-off-by: blalov <boyko.lalov@tick42.com>
This commit is contained in:
parent
f419fba40e
commit
ebe5380433
|
@ -135,7 +135,7 @@ class PanelList extends Component<RouteComponentProps & PathPrefixProps, PanelLi
|
|||
updateURL() {
|
||||
const query = encodePanelOptionsToQueryString(this.state.panels);
|
||||
window.history.pushState({}, '', query);
|
||||
};
|
||||
}
|
||||
|
||||
addPanel = () => {
|
||||
const { panels } = this.state;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { decodePanelOptionsFromQueryString, encodePanelOptionsToQueryString } from './urlParams';
|
||||
import { PanelType } from '../Panel';
|
||||
|
||||
const panels = [
|
||||
const panels: any = [
|
||||
{
|
||||
key: '0',
|
||||
options: {
|
||||
|
@ -33,7 +33,7 @@ describe('decodePanelOptionsFromQueryString', () => {
|
|||
expect(decodePanelOptionsFromQueryString('')).toEqual([]);
|
||||
});
|
||||
it('returns and array of parsed params when query string is non-empty', () => {
|
||||
expect(decodePanelOptionsFromQueryString(query)).toEqual(panels);
|
||||
expect(decodePanelOptionsFromQueryString(query)).toMatchObject(panels);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue