Skip to content

Commit 006251a

Browse files
committed
12 to go
1 parent a39bb64 commit 006251a

File tree

6 files changed

+5
-8
lines changed

6 files changed

+5
-8
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"react-native": "0.77.0-rc.0",
9191
"react-test-renderer": "18.3.1",
9292
"release-it": "^18.0.0",
93-
"strip-ansi": "^6.0.1",
9493
"typescript": "^5.6.3",
9594
"typescript-eslint": "^8.19.1"
9695
},

src/__tests__/questionsBoard.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { render, screen, userEvent } from '..';
44

55
type QuestionsBoardProps = {
66
questions: string[];
7-
onSubmit: (obj: {}) => void;
7+
onSubmit: (obj: object) => void;
88
};
99

1010
jest.useFakeTimers();

src/__tests__/render-debug.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as React from 'react';
22
import { Pressable, Text, TextInput, View } from 'react-native';
3-
import stripAnsi from 'strip-ansi';
43
import { configure, fireEvent, render, screen } from '..';
54
import { logger } from '../helpers/logger';
65

src/helpers/errors.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import prettyFormat from 'pretty-format';
22

33
export class ErrorWithStack extends Error {
4+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
45
constructor(message: string | undefined, callsite: Function) {
56
super(message);
67
if (Error.captureStackTrace) {
@@ -32,6 +33,7 @@ export const prepareErrorMessage = (
3233
return errorMessage;
3334
};
3435

36+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
3537
export const createQueryByError = (error: unknown, callsite: Function): null => {
3638
if (error instanceof Error) {
3739
if (error.message.includes('No instances found')) {
@@ -41,9 +43,7 @@ export const createQueryByError = (error: unknown, callsite: Function): null =>
4143
}
4244

4345
throw new ErrorWithStack(
44-
// generic refining of `unknown` is very hard, you cannot do `'toString' in error` or anything like that
45-
// Converting as any with extra safe optional chaining will do the job just as well
46-
`Query: caught unknown error type: ${typeof error}, value: ${(error as any)?.toString?.()}`,
46+
`Query: caught unknown error type: ${typeof error}, value: ${error}`,
4747
callsite,
4848
);
4949
};

src/helpers/timers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function getFakeTimersConfigFromType(type: FakeTimersTypes) {
6464
const jestFakeTimersAreEnabled = (): boolean => Boolean(getJestFakeTimersType());
6565

6666
// we only run our tests in node, and setImmediate is supported in node.
67-
function setImmediatePolyfill(fn: Function) {
67+
function setImmediatePolyfill(fn: () => void) {
6868
return globalObj.setTimeout(fn, 0);
6969
}
7070

yarn.lock

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2904,7 +2904,6 @@ __metadata:
29042904
react-test-renderer: "npm:18.3.1"
29052905
redent: "npm:^3.0.0"
29062906
release-it: "npm:^18.0.0"
2907-
strip-ansi: "npm:^6.0.1"
29082907
typescript: "npm:^5.6.3"
29092908
typescript-eslint: "npm:^8.19.1"
29102909
peerDependencies:

0 commit comments

Comments
 (0)