You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
626 B
16 lines
626 B
import { transformResponse, transformToZipkin } from './transforms';
|
|
import { traceFrameFields, zipkinResponse } from './testData';
|
|
import { MutableDataFrame } from '@grafana/data';
|
|
|
|
describe('transformResponse', () => {
|
|
it('transforms response', () => {
|
|
const dataFrame = transformResponse(zipkinResponse);
|
|
|
|
expect(dataFrame.fields).toMatchObject(traceFrameFields);
|
|
});
|
|
it('converts dataframe to ZipkinSpan[]', () => {
|
|
const dataFrame = transformResponse(zipkinResponse);
|
|
const response = transformToZipkin(new MutableDataFrame(dataFrame));
|
|
expect(response).toMatchObject(zipkinResponse);
|
|
});
|
|
});
|
|
|