Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Convert named stories exports value to ObjectExpression #266

Open
wants to merge 4 commits into
base: next
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update snapshots
xeho91 committed Jan 17, 2025

Verified

This commit was signed with the committer’s verified signature. The key has expired.
xeho91 Mateusz Kadlubowski
commit e1ee0c0d3d24621ad6a2513dbb4da3cdc8de5f24
Original file line number Diff line number Diff line change
@@ -30,6 +30,6 @@ describe(createNamedExportStory.name, () => {
}) as unknown as ESTreeAST.Program
).code;

expect(stringified).toMatchInlineSnapshot(`"export const Default = __stories["Default"];"`);
expect(stringified).toMatchInlineSnapshot(`"export const Default = { ...__stories["Default"], tags: [] };"`);
});
});
8 changes: 4 additions & 4 deletions src/compiler/post-transform/index.test.ts
Original file line number Diff line number Diff line change
@@ -239,10 +239,10 @@ describe(transformStoriesCode.name, () => {
"WithoutTemplate"
];
export const Default = __stories["Default"];
export const Rounded = __stories["Rounded"];
export const Square = __stories["Square"];
export const WithoutTemplate = __stories["WithoutTemplate"];"
export const Default = { ...__stories["Default"], tags: [] };
export const Rounded = { ...__stories["Rounded"], tags: [] };
export const Square = { ...__stories["Square"], tags: [] };
export const WithoutTemplate = { ...__stories["WithoutTemplate"], tags: [] };"
`
);
});