Skip to content

Commit

Permalink
Merge pull request #252 from storybookjs/node-18
Browse files Browse the repository at this point in the history
Use ipv4 loopback address
  • Loading branch information
yannbf committed Feb 1, 2023
1 parent f7f325e commit a3c6e84
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -100,9 +100,9 @@ yarn test-storybook
> **NOTE:** The runner assumes that your Storybook is running on port `6006`. If you're running Storybook in another port, either use --url or set the TARGET_URL before running your command like:
>
> ```jsx
> yarn test-storybook --url http://localhost:9009
> yarn test-storybook --url http://127.0.0.1:9009
> or
> TARGET_URL=http://localhost:9009 yarn test-storybook
> TARGET_URL=http://127.0.0.1:9009 yarn test-storybook
> ```
## CLI Options
Expand Down
4 changes: 2 additions & 2 deletions bin/test-storybook.js
Expand Up @@ -133,7 +133,7 @@ async function checkStorybook(url) {
If you're not running Storybook on the default 6006 port or want to run the tests against any custom URL, you can pass the --url flag like so:
yarn test-storybook --url http://localhost:9009
yarn test-storybook --url http://127.0.0.1:9009
More info at https://github.com/storybookjs/test-runner#getting-started`
);
Expand Down Expand Up @@ -222,7 +222,7 @@ const main = async () => {
// set this flag to skip reporting coverage in watch mode
isWatchMode = jestOptions.watch || jestOptions.watchAll;

const rawTargetURL = process.env.TARGET_URL || runnerOptions.url || 'http://localhost:6006';
const rawTargetURL = process.env.TARGET_URL || runnerOptions.url || 'http://127.0.0.1:6006';
await checkStorybook(rawTargetURL);

const targetURL = sanitizeURL(rawTargetURL);
Expand Down
2 changes: 1 addition & 1 deletion src/util/getParsedCliOptions.ts
Expand Up @@ -27,7 +27,7 @@ export const getParsedCliOptions = () => {
.option(
'--url <url>',
'Define the URL to run tests in. Useful for custom Storybook URLs',
'http://localhost:6006'
'http://127.0.0.1:6006'
)
.option(
'--maxWorkers <amount>',
Expand Down

0 comments on commit a3c6e84

Please sign in to comment.