Pausansol / Camilo

Sketch plugin specially crafted to work in Design systems with multiple themes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add unit testing

eduardogr opened this issue · comments

It would be nice to add unit tests to ensure quality for Camilo logic

I'd try this, do you have a preference for testing framework? Is jest fine?
And can you point me which file has heaviest logic and should be first to focus on?
I wasn't checking details yet, so I'm not sure where to start.

i'd like this to be done via skmp-test, What do you think?

main logic are place in switch-library and switch-selection files and replace* ones that are used by them, those files are good candidates to test

oh, sure, skmp-test makes sense, since skmp is used for build so it has much more suitable toolkit

And actually, looks like skmp-test is using jest in the background :)

yes, it is :)

So, what do you think? feel free to unit test all of this, and fill the script npm run test that now is just failing

ok, I'll start working on it

I'm sorry, I did what I could, and it looks more complicated, to be able to test it properly.
Loading document, loading libraries and checking that everything what should has been changed.
Here is just a simple setup to have the test configuration ready.