Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit21f5f0e

Browse files
committed
docs(site): add isError flag for query error state testing
Add note about using isError: true flag when testing error stateswith the queries parameter in Storybook stories.Found while reviewing mckayla's commitd2c1562 which introducedthis pattern for cleaner error state testing.
1 parent453a8ac commit21f5f0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎site/CLAUDE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ Use Tailwind CSS utility classes:
131131
**PREFERRED PATTERN**: For GET endpoint mocks in Storybook stories, use`queries` parameter instead of`spyOn`.
132132

133133
```tsx
134-
// Use queries parameter pattern
135134
parameters: {
136135
queries: [
137136
{
@@ -154,6 +153,7 @@ parameters: {
154153
- This applies specifically to GET endpoint mocks in Storybook stories
155154
-`spyOn` is still appropriate for other mock types (POST, PUT, DELETE, non-GET endpoints)
156155
- Must import the correct query key functions (e.g.,`usersKey`,`getTemplatesQueryKey`)
156+
- For error states, add`isError: true` to the query object
157157

158158
###Chromatic/Storybook Testing Best Practices
159159

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp