styleguidist/snapguidist
소개
React Styleguidist용 스냅샷 테스트입니다.
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original
Jest Snapshot Testing for React Styleguidist.
Demo

Getting Started
To add snapguidist to your react-styleguidist configuration, follow these steps:
- install the package using yarn or npm:
yarn add --dev snapguidist
- enhance the webpack configuration in
styleguide.config.js:
+const snapguidist = require('snapguidist');
-module.exports = {
+module.exports = snapguidist({
components: 'src/components/**/[A-Z]*.js',
defaultExample: true,
webpackConfig: {
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
},
{
test: /\.css$/,
loader: 'style-loader!css-loader',
},
],
},
},
-};
+});
Migrate to v4
In v4, snapshots have been renamed to .sg (as opposed to .snap) to avoid conflicts with Jest, and improve compatibility with create-react-app.
Once upgraded to v4, please run yarn test -u to remove the old snapshots (new ones will be automatically generated on the next run)
or the following commands to rename them:
cd .snapguidist/__snapshots/
for old in *.snap; do git mv $old `basename $old .snap`.sg; done
Example
To run the example, install the dependencies and start it:
cd example
yarn install
yarn start
Development
Any contribution to
snapguidistis highly appreciated.
Run the following command from the root folder to enable the hot-reload:
yarn build:watch & yarn start
Credits
Logo by @SaraVieira
관련 프로젝트 살펴보기
불러오는 중…