nuxt-template icon indicating copy to clipboard operation
nuxt-template copied to clipboard

Feature: testing?

Open james2doyle opened this issue 3 years ago • 1 comments

Nice template! Thanks for sharing. It would be cool to have snapshot testing support out-of-the-box.

Lots of people tend to use unit or end-to-end tests but for components, especially pages and layouts, I find snapshots much much better as they test the entire output of the component. So moving/changing a class, adding/removing attributes, or changing content, can be captured in a single line. Combine that with before and after snapshots for prop and data changes you can get a ton of coverage on your stuff.

What do you think? I can probably submit a PR for this if you're interested

james2doyle avatar May 14 '21 17:05 james2doyle

I know not much about snapshot testing. I would appreciate a PR 😊 I might learn something from it 👍

On Fri, May 14 2021 at 7:17 PM, James Doyle < @.*** > wrote:

Nice template! Thanks for sharing. It would be cool to have snapshot testing support out-of-the-box.

Lots of people tend to use unit or end-to-end tests but for components, especially pages and layouts, I find snapshots much much better as they test the entire output of the component. So moving/changing a class, adding/removing attributes, or changing content, can be captured in a single line. Combine that with before and after snapshots for prop and data changes you can get a ton of coverage on your stuff.

What do you think? I can probably submit a PR for this if you're interested

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub ( https://github.com/themarcba/nuxt-template/issues/1 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AALAYMYO4SR2YFTXZTH3JE3TNVLI5ANCNFSM444ZJBQA ).

themarcba avatar May 14 '21 18:05 themarcba