bestguy / sveltestrap

Bootstrap 4 & 5 components for Svelte
https://sveltestrap.js.org
MIT License
1.31k stars 183 forks source link

Add tests #18

Open bestguy opened 5 years ago

bestguy commented 5 years ago

Haven't kept up with Svelte testing best practices, but this project needs unit tests..

Perhaps try out https://github.com/bahmutov/cypress-svelte-unit-test

bestguy commented 5 years ago

Taking a look at: https://github.com/testing-library/svelte-testing-library

Looks promising.

bestguy commented 5 years ago

WIP: https://github.com/bestguy/sveltestrap/pull/35

bestguy commented 5 years ago

Also: https://github.com/bestguy/sveltestrap/pull/37

bestguy commented 5 years ago

Tests have been started and merged, will update this issue with missing component tests.

DaniAcu commented 3 years ago

I'm new here, but I'm really happy to contribute. I'd like to know if we could change the folders a little bit. I mean currently we have a __test__ folder with all our test. But I wondering if we could move more to a component folders with test and inplamentation in the same folder.

I think this could help to everyone to identify quickly which components has or not test, and if they need to add it 😄

bestguy commented 3 years ago

Hi @DaniAcu , thanks for the help. The tests thing is a jest standard, so ran with it. Might be better to stick with it since there are already .d.ts files too. Might be a little much 😅

DaniAcu commented 3 years ago

Mmm okay, yeah move all sounds too much work to do. Maybe we could just keep it in the eyes but as long as this can scale and be easy to maintain, I'm fine with that. Thanks for the feedback 😄