mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 02:21:07 +08:00
Split problematic snippet into two
- It previously mixed three package manager snippets with a common one, which doesn't work correctly
This commit is contained in:
parent
d1e2130f9b
commit
c94e995d2d
@ -1,7 +1,3 @@
|
||||
```shell renderer="common" language="js" tabTitle="env-var"
|
||||
TARGET_URL=https://the-storybook-url-here.com yarn test-storybook
|
||||
```
|
||||
|
||||
```shell renderer="common" language="js" packageManager="npm"
|
||||
npm run test-storybook -- --url https://the-storybook-url-here.com
|
||||
```
|
||||
@ -13,4 +9,3 @@ pnpm run test-storybook --url https://the-storybook-url-here.com
|
||||
```shell renderer="common" language="js" packageManager="yarn"
|
||||
yarn test-storybook --url https://the-storybook-url-here.com
|
||||
```
|
||||
|
||||
|
@ -100,7 +100,7 @@ If you're already using any of those flags in your project, you should be able t
|
||||
|
||||
### Run tests against a deployed Storybook
|
||||
|
||||
By default, the test-runner assumes that you're running it against a locally served Storybook on port `6006`. If you want to define a target URL to run against deployed Storybooks, you can use the `--url` flag or set the `TARGET_URL` environment variable. For example:
|
||||
By default, the test-runner assumes that you're running it against a locally served Storybook on port `6006`. If you want to define a target URL to run against deployed Storybooks, you can use the `--url` flag:
|
||||
|
||||
{/* prettier-ignore-start */}
|
||||
|
||||
@ -108,6 +108,12 @@ By default, the test-runner assumes that you're running it against a locally ser
|
||||
|
||||
{/* prettier-ignore-end */}
|
||||
|
||||
Alternatively, you can set the `TARGET_URL` environment variable and run the test-runner:
|
||||
|
||||
```sh
|
||||
TARGET_URL=https://the-storybook-url-here.com yarn test-storybook
|
||||
```
|
||||
|
||||
## Set up CI to run tests
|
||||
|
||||
You can also configure the test-runner to run tests on a CI environment. Documented below are some recipes to help you get started.
|
||||
|
Loading…
x
Reference in New Issue
Block a user