toBeOfUse / actions-test

0 stars 0 forks source link

Tracking: Diagnostics #10

Open diagnostic-tracker[bot] opened 1 week ago

diagnostic-tracker[bot] commented 1 week ago

TypeScript Errors

There are 3 TypeScript errors.

1 is in stories. 0 are in tests.

The most common error types are:

❌ Error in index.ts:6:0:

Type 'string' is not assignable to type 'number'.

❌ Error in index.ts:7:0:

Type 'string' is not assignable to type 'number'.

❌ Error in stories/blog/post.stories.tsx:46:2:

Type '(args: { title: string; author: string; date: string; content: string; authorImage: string; liked: boolean; likeCallback: (likedNow: boolean) => void; }, { loaded: { post } }: { loaded: { post: SanityPost; }; }) => Element' is not assignable to type 'ArgsStoryFn<ReactRenderer, { title: string; author: string; date: string; content: string; authorImage: string; liked: boolean; likeCallback: (likedNow: boolean) => void; }>'.
Types of parameters '__1' and 'context' are incompatible.
Type 'StoryContext<ReactRenderer, { title: string; author: string; date: string; content: string; authorImage: string; liked: boolean; likeCallback: (likedNow: boolean) => void; }>' is not assignable to type '{ loaded: { post: SanityPost; }; }'.
Types of property 'loaded' are incompatible.
Property 'post' is missing in type 'Record<string, any>' but required in type '{ post: SanityPost; }'.

Jest Errors

There is 1 failing Jest test.

Failing test:

string reversing function reverses strings can reverse 'hello' (within "string reversing function reverses strings") (string_functions.test.ts:13:5) failed with

Error: expect(received).toEqual(expected) // deep equality

Expected: "olleh"
Received: "oleh"

Storybook Errors

There is 1 failing Storybook test.

Failing test:

Post > LikeTest > play-test (stories/blog/post.stories.tsx) failed with

page.evaluate: StorybookTestRunnerError: expect(element).not.toBeInTheDocument()

expected document not to contain element, found <svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-vubbuv"
data-testid="FavoriteBorderIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3m-4.4 15.55-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05"
/>
</svg> instead
nllewellyn12 commented 1 week ago

This is pretty gnarly