We want to convert the various *.test.js files throughout the repository over to use Typescript. In theory this should be just a simple rename *.js -> *.ts but there are some issues with the typing that fail the test run.
e.g. if we try this on the get-icon-test.js
file we get the following error when executing the tests with npm run test
.
src/utils/get-icon.test.ts:4:17 - error TS2345: Argument of type '() => void' is not assignable to parameter of type '(done: () => void) => Promise<any> | null'.
Type 'void' is not assignable to type 'Promise<any> | null'.
4 test('getIcon', () => {