Comments (9)
Sure, I'll rebase the vitest branch to the latest main branch, and I'll open a PR, and we can continue the work there.
from anu.
I was not sure, to be honest. The reason of those was that I have seen that null
values in the slots are converted somewhere in the rendering to <!---->
- my guess that it is an issue of the JSX transpiling, but have not tested.
Example:
You hvae a button, and the default slot is 'Click me'
If you have null
there as in the original, the button is rendered as (note the two <!---->
for each null slot ):
<button style="...">
<!---->Click me
<!---->
</button>
if you use empty strings instead of null, these placeholders are not rendered.
<button style="...">Click me</button>
It's really a cosmetic stuff, and I think the original version with the null
is the best, just would be nice to render them as empty, instead of such placeholders.
I'll revert back to null.
from anu.
Hi @peterbud
I'm ready to learn vitest now. Do you have any fine resources?
Moreover, it will be great if you can suggest a scalable folder structure for Anu's tests.
Thanks.
from anu.
Normally I read the docs, it's pretty good for vitest.
For the test structure we have options:
- Either all tests are going to be in a separate "test" folder
- Or we can also make it work I believe to locate each test next to the component in the respective folder
What would be your preference?
from anu.
Ohk, I will start with docs then.
Mostly, I noticed people have separate test folder, 1st option.
from anu.
Btw, i must ask as we have component library what's suitable?
from anu.
Another option is, should we have tests inside each package instead of single test folder in root π€
from anu.
I have also found a good example for component testing for element-plus:
https://github.com/element-plus/element-plus/blob/dev/packages/components/button/__tests__/button.test.tsx
They keep the tests next to each component, and I think it's a good example of what they are testing in the components
from anu.
Hmm, That's another approach.
After checking out some other libs I think we should place tests
dir in the root, outside of packages, your 1st option.
Can you give us a boost start?
from anu.
Related Issues (20)
- feat: chip closable advance HOT 2
- Styles are not loaded in the latest Nuxt HOT 7
- [docs] Components such as Select and Radio in the document cannot interact HOT 1
- svelte support HOT 1
- nuxt - anu-vue/volar HOT 3
- update vueuse peerDependencies
- WARN [unocss] include option is deprecated, use content.pipeline.include instead. HOT 2
- Tabs border does not respond to window size change HOT 1
- [unocss] include option is deprecated, use content.pipeline.include instead. But, I didn't use include.
- Colors broken with UnoCSS v0.57 HOT 7
- Have a Bug in the switch component? HOT 3
- typescript types errorοΌ HOT 2
- π€Ήπ»ββοΈ Framework stability in Vue Ecosystem & my vision HOT 4
- update vue peerDependencies HOT 1
- How the selection box sets the properties of the display HOT 1
- [Select] Feature request: Groups for the select element
- v1
- List component unusable with TypeScript HOT 4
- ADatatable : event on clicked / hovered
- Style conflict vitepress HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anu.