mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 08:42:15 +08:00
DashboardDataSource: Fixes issue where sometimes untransformed data could be returned (#87433)
* DashboardDataSource: always return a result key * Update * Update
This commit is contained in:
@ -26,6 +26,16 @@ describe('DashboardDatasource', () => {
|
||||
expect(rsp?.data[0].fields[0].values).toEqual([1, 2, 3]);
|
||||
});
|
||||
|
||||
it('should always set response key', async () => {
|
||||
const { observable } = setup({ refId: 'A', panelId: 1 });
|
||||
|
||||
let rsp: DataQueryResponse | undefined;
|
||||
|
||||
observable.subscribe({ next: (data) => (rsp = data) });
|
||||
|
||||
expect(rsp?.key).toEqual('source-ds-provider');
|
||||
});
|
||||
|
||||
it('Can subscribe to panel data + transforms', async () => {
|
||||
const { observable } = setup({ refId: 'A', panelId: 1, withTransforms: true });
|
||||
|
||||
|
Reference in New Issue
Block a user