Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eiel/storyshot-jest
https://github.com/eiel/storyshot-jest
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/eiel/storyshot-jest
- Owner: eiel
- License: mit
- Created: 2022-07-25T08:48:22.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-16T16:25:54.000Z (4 months ago)
- Last Synced: 2024-09-16T20:05:16.528Z (4 months ago)
- Language: JavaScript
- Size: 272 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @eiel/storyshot-jest
jest 27, 28 transformer for storyshot# Motivation
don't work [@storybook/addon-storyshots](https://www.npmjs.com/package/@storybook/addon-storyshots) in Jest version 27
provide unoffitial package for storyshots in Jest v27, v28# Install
```
npm install -D @eiel/storyshot-jest-28 # in Jest 28
npm install -D @eiel/storyshot-jest-27 # in Jest 27
```update `jest.config.js` for storyshot
```diff
transform: {
- '^.+\\.stories\\.tsx?$': '@storybook/addon-storyshots/injectFileName',
+ '^.+\\.stories\\.tsx?$': '@eiel/storyshot-jest-28', // in Jest 28
+ '^.+\\.stories\\.tsx?$': '@eiel/storyshot-jest-27', // in Jest 27
'^.+\\.[jt]sx?$': 'babel-jest',
},
```# Description
Jest transformer API break change in Jest v27.
see https://jestjs.io/docs/code-transformation
Don,t fix still offitial Jest transform by storybook.
So, I wrote alternate transformer for storyshot in Jest v27.I will archive this repository when official support Jest v27 release.