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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ipv4 loopback address #252

Merged
merged 1 commit into from Feb 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -103,9 +103,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