-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Isaac Graves
committed
Dec 24, 2023
1 parent
766f5d0
commit 6ff480d
Showing
9 changed files
with
2,038 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { $ } from "zx"; | ||
|
||
let exitCode = 0; | ||
|
||
// required dependency of test-storybook - only chromium is needed | ||
await $`pnpm dlx playwright install chromium --with-deps`; | ||
// build a fresh copy of storybook | ||
await $`pnpm build:storybook --quiet`; | ||
// serve the newly build storybook for testing | ||
const server = $`pnpm exec http-server storybook-static --port 6006 --silent`; | ||
// catch any errors to ensure server is closed properly | ||
try { | ||
// wait for static server to be ready | ||
await $`pnpm exec wait-on tcp:6006`; | ||
// run the tests | ||
await $`pnpm test-storybook`; | ||
} catch (e) { | ||
console.error(e); | ||
// exit with error code | ||
exitCode = 1; | ||
} | ||
// kill the static server | ||
await server.kill(); | ||
// exit process | ||
process.exit(exitCode); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.