* Remove babel Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Remove duplicated patch-package dep Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch to @fetch-mock/vitest Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update tests to import & call vitest functions Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update test-utils imports Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update unit test snapshots Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch from jest->vitest for unit tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update visual test screenshots Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch from test-runner->vitest for visual tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update README Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update CI for shared-components unit & visual tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update yarn.lock Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update README Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix storybook trying to import vitest Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix css modules leaking between storybook tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Tweak screenshot update script to accept args Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
20 lines
870 B
Bash
Executable File
20 lines
870 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Update storybook screenshots
|
|
#
|
|
# This script should be used as the entrypoint parameter of the `playwright-screenshots` script. It
|
|
# installs the yarn dependencies, and then runs `vitest --run --update --project=storybook` to update the storybook screenshots.
|
|
#
|
|
# It requires that `playwright-screenshots` is given the `--with-node-modules` parameter.
|
|
|
|
set -e
|
|
|
|
# First install dependencies. We have to do this within the playwright container rather than the host,
|
|
# because we have which must be built for the right architecture (and some environments use a VM
|
|
# to run docker containers, meaning that things inside a container use a different architecture than
|
|
# those on the host).
|
|
yarn
|
|
|
|
# Now run the screenshot update, we set CI=1 to inform vis to update the real baselines
|
|
CI=1 /work/node_modules/.bin/vitest --run --update --project=storybook "$@"
|