Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add preact-snapshot-test. #1306

Closed
wants to merge 3 commits into from
Closed

Conversation

paranoidjk
Copy link
Contributor

@paranoidjk paranoidjk commented May 12, 2017

close #1267

from https://github.com/adriantoine/enzyme-to-json#user-content-serializer:

This is inspired by jest-serializer-enzyme, I first added a note to jest-serializer-enzyme but I then realised that the output is different, so it is not retro compatible with enzyme-to-json because it's using Enzyme debug helper which doesn't put each prop on a separate line.

First of all, thanks for your contribution! :-)

Please makes sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow antd's code convention.
  • Run npm run lint and fix those errors before submitting in order to keep consistent code style.
  • Rebase before creating a PR to keep commit history clear.
  • Add some descriptions and refer relative issues for you PR.

This change is Reviewable

@mention-bot
Copy link

@paranoidjk, thanks for your PR! By analyzing the history of the files in this pull request, we identified @yiminghe, @pingan1927 and @silentcloud to be potential reviewers.

@paranoidjk paranoidjk changed the title feat: add preact-snapshot-test. [WIP] feat: add preact-snapshot-test. May 12, 2017
@@ -23,6 +41,14 @@ export function webDemoTest(component, options = {}) {
});
}

export function webDemoTest(...args) {
if (process.env.TEST_ENV === 'preact') {
Copy link
Contributor

@cncolder cncolder May 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里和 npm scripts 不一致。

"test:web-preact": "TEST_ENV=PREACT jest --config .jest.preact.json",

个人觉得应该像 NODE_ENV 一样采用小写。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok,大小写倒不限制,主要是手滑两边没统一...

@paranoidjk paranoidjk force-pushed the add-preact-snapshot branch from 3353027 to 062032a Compare May 12, 2017 15:18
@paranoidjk paranoidjk changed the title [WIP] feat: add preact-snapshot-test. feat: add preact-snapshot-test. May 12, 2017
@codecov
Copy link

codecov bot commented May 12, 2017

Codecov Report

Merging #1306 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1306   +/-   ##
=======================================
  Coverage   63.12%   63.12%           
=======================================
  Files         100      100           
  Lines        2099     2099           
  Branches      654      654           
=======================================
  Hits         1325     1325           
  Misses        774      774
Flag Coverage Δ
#rn 63.12% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 49d4716...e10490b. Read the comment docs.

@afc163
Copy link
Member

afc163 commented May 13, 2017

snapshot 可能无法覆盖 trigger 和弹层的情况。

@paranoidjk paranoidjk force-pushed the master branch 2 times, most recently from 794ec1b to bd9b23e Compare June 2, 2017 18:09
@paranoidjk
Copy link
Contributor Author

@paranoidjk paranoidjk closed this Jun 8, 2017
@paranoidjk paranoidjk deleted the add-preact-snapshot branch June 8, 2017 05:58
@paranoidjk paranoidjk mentioned this pull request Sep 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add preact snapshot test
4 participants