nx-loki
v1.2.5
Published
`nx-loki` is an Nx plugin for integrating [Loki](https://github.com/oblador/loki), a visual regression testing tool for Storybook, into your Nx workspace. This plugin helps you set up and run visual regression tests to ensure that your UI components remai
Readme
nx-loki
nx-loki is an Nx plugin for integrating Loki, a visual regression testing tool for Storybook, into your Nx workspace. This plugin helps you set up and run visual regression tests to ensure that your UI components remain consistent over time.
Installation
To add the nx-loki plugin to your Nx workspace, run the following command:
nx add nx-lokiThis command will modify your package.json to add Loki as a development dependency and include nx-loki in the list of plugins in your nx.json.
Configuration
To configure nx-loki for a specific project in your workspace, use the following command:
nx g nx-loki:configuration <project-name>This command will add the necessary configuration files and settings to your project to enable Loki for visual regression testing.
Usage
Running Visual Regression Tests
To run visual regression tests with Loki, use the following command:
npx nx run <project-name>:lokiThis command will execute the visual regression tests for the specified project.
Updating Baseline Images
If you need to update the baseline images for your visual regression tests, use the following command:
npx nx run <project-name>:loki-updateThis command will update the baseline images with the current state of your UI components.
Approving Changes
To approve changes detected by Loki, use the following command:
npx nx run <project-name>:loki-approveThis command will approve the changes and update the baseline images accordingly.
Additional Resources
For more information about Loki and its configuration options, refer to the Loki documentation.
For more information about Nx and its capabilities, refer to the Nx documentation.
