Skip to content

Commit

Permalink
Merge pull request #483 from storybookjs/yann/fix-eject
Browse files Browse the repository at this point in the history
Fix contents of eject functionality
  • Loading branch information
yannbf authored Jun 13, 2024
2 parents 7316142 + 3c11018 commit fa76d30
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/test-storybook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,10 @@ function ejectConfiguration() {
\n`);
}

fs.copyFileSync(origin, destination);
log('Configuration file successfully copied as test-runner-jest.config.js');
// copy contents of origin and replace ../dist with @storybook/test-runner
const content = fs.readFileSync(origin, 'utf-8').replace(/..\/dist/g, '@storybook/test-runner');
fs.writeFileSync(destination, content);
log(`Configuration file successfully generated at ${destination}`);
}

function warnOnce(message: string) {
Expand Down

0 comments on commit fa76d30

Please sign in to comment.