-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Added custom test
function for storyshots
#1035
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore my other review on #971. Prefer renderOnly
to justRender
. 😸
packages/storyshots/src/index.js
Outdated
(pkg.devDependencies && pkg.devDependencies['@kadira/react-native-storybook']) || | ||
(pkg.dependencies && pkg.dependencies['@kadira/react-native-storybook']); | ||
|
||
const hasDependency = function(name) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<3
@tmeasday there are merge conflicts |
Let me rebase |
5df15fa
to
48ecba6
Compare
Codecov Report
@@ Coverage Diff @@
## master #1035 +/- ##
========================================
Coverage ? 0%
========================================
Files ? 1
Lines ? 5
Branches ? 1
========================================
Hits ? 0
Misses ? 4
Partials ? 1
Continue to review full report at Codecov.
|
48ecba6
to
6c971f2
Compare
LMK if you want me to rebase this onto #1031 |
|
||
initStoryshots(); | ||
|
||
// initStoryshots({ test: renderOnly }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is an example of something that could be done for user's reference, maybe leave a comment? Otherwise, just remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's basically a way of testing renderOnly
(until we figure out a better testing strategy). I'll try to make it better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to just get rid of it for now.
838ef89
to
5b2830f
Compare
5b2830f
to
b00d4a4
Compare
test
function for storyshots
test
function for storyshotstest
function for storyshots
Issue: #1034
What I did
Branched off #971, this pulls the default implementation of the test function into a
snapshot
export, adds arenderOnly
export, and allows you to pass your own function in.How to test
In the
test-cra
app, you can try the default, passing inrenderOnly
or your own function that asserts/throws.