-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
test(runtime-vapor): component props #99
Conversation
✅ Deploy Preview for vapor-repl ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Size ReportBundles
Usages
|
Would it be better to test only the props without including the rendering process, |
After all, I think I'll rewrite it a bit. |
…iple-type declarations)
…s long-form definition object)
I think it would be better to have unit tests closer to the user side. (including rendering) |
I was thinking of aligning it with the test cases of the traditional components to maintain compatibility, but what do you think? |
Including render seems to inevitably give it a feel of an integration test. |
// NOTE: not supported | ||
// optimized props update | ||
// mixins | ||
// validator | ||
// warn | ||
// caching |
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.
Is my understanding correct about this area?
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.
for optimized props update
: maybe it's unnecessary (I'm not sure for now). But Vapor can also pass the test. So let's add it first and then remove it if it's useless at the end of the development of Vapor.
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.
validator
should be implemented as well. Let's add it as test.todo
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.
warn
: What the reason is that you think it should be not supported? IMHO it should be also included.
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.
For the rest, let's drop them.
I have implemented the test based on the test cases of There are some points of uncertainty.
test result: |
fc30319
to
99ed6b3
Compare
We need two kinds of tests: test each single functions (something like |
// NOTE: not supported | ||
// optimized props update | ||
// mixins | ||
// validator | ||
// warn | ||
// caching |
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.
for optimized props update
: maybe it's unnecessary (I'm not sure for now). But Vapor can also pass the test. So let's add it first and then remove it if it's useless at the end of the development of Vapor.
// NOTE: not supported | ||
// optimized props update | ||
// mixins | ||
// validator | ||
// warn | ||
// caching |
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.
validator
should be implemented as well. Let's add it as test.todo
// NOTE: not supported | ||
// optimized props update | ||
// mixins | ||
// validator | ||
// warn | ||
// caching |
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.
warn
: What the reason is that you think it should be not supported? IMHO it should be also included.
// NOTE: not supported | ||
// optimized props update | ||
// mixins | ||
// validator | ||
// warn | ||
// caching |
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.
For the rest, let's drop them.
…/runtime-component-props
I created issue for props e2e test. |
Thank you for the review! I've made some revisions. Regarding the caching of the default value, if I remove it, it might become unclear what the test is for, so for now, I'm leaving it commented out. (I wonder if it's okay to just delete it... It might be hard to tell if it was intentionally removed, so I feel it might be better to leave it for now and delete it later.) |
fcf60d5
to
c06f2f6
Compare
c06f2f6
to
c36257d
Compare
…/runtime-component-props
✅ Deploy Preview for vapor-template-explorer ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Since pulling main, some tests are faild. |
fixed. |
close #81
This is a new PR for #85!I have implemented tests for the props runtime that I developed.As mentioned in #74 (comment), it uses getCurrentInstance to access props in the code.#99 (comment)