Chore: fix type errors in tests (#63270)

* fix any's in tests

* fix more any's in tests

* more test type fixes

* fixing any's in tests part 3

* more test type fixes

* fixing test any's p5

* some tidy up

* fix template_srv
This commit is contained in:
Ashley Harrison
2023-02-14 16:46:42 +01:00
committed by GitHub
parent 4b0faf1c9e
commit f8d89eff56
139 changed files with 675 additions and 1080 deletions
@@ -60,7 +60,7 @@ describe('Apending DataFrame', () => {
// Make sure length survives a spread operator
const keys = Object.keys(frame);
const copy = { ...frame } as any;
const copy = { ...frame } as MutableDataFrame;
expect(keys).toContain('length');
expect(copy.length).toEqual(frame.length);
});
@@ -1,4 +1,4 @@
import { FieldType } from '../types/dataFrame';
import { DataFrame, FieldType } from '../types/dataFrame';
import { compareDataFrameStructures, compareArrayValues } from './frameComparisons';
import { toDataFrame } from './processDataFrame';
@@ -32,12 +32,12 @@ describe('test comparisons', () => {
expect(compareDataFrameStructures(frameA, frameA)).toBeTruthy();
expect(compareDataFrameStructures(frameA, { ...frameA })).toBeTruthy();
expect(compareDataFrameStructures(frameA, frameB)).toBeFalsy();
expect(compareDataFrameStructures(frameA, null as any)).toBeFalsy();
expect(compareDataFrameStructures(undefined as any, frameA)).toBeFalsy();
expect(compareDataFrameStructures(frameA, null as unknown as DataFrame)).toBeFalsy();
expect(compareDataFrameStructures(undefined as unknown as DataFrame, frameA)).toBeFalsy();
expect(compareArrayValues([frameA], [frameA], compareDataFrameStructures)).toBeTruthy();
expect(compareArrayValues([frameA], null as any, compareDataFrameStructures)).toBeFalsy();
expect(compareArrayValues(null as any, [frameA], compareDataFrameStructures)).toBeFalsy();
expect(compareArrayValues([frameA], null as unknown as DataFrame[], compareDataFrameStructures)).toBeFalsy();
expect(compareArrayValues(null as unknown as DataFrame[], [frameA], compareDataFrameStructures)).toBeFalsy();
});
it('name change should be a structure change', () => {