Skip to content

Commit

Permalink
fix contents of eject functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Jun 13, 2024
1 parent 7316142 commit 3c11018
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 3c11018

Please sign in to comment.