Vue screenshot tool based on Vite
Visual testing is a way of testing. Unit testing covers only functional aspects. Many testing methods only cover functional aspects and tell you whether the HTML structure is correct. Visual testing will tell you about the components appearance. There are many tools like Puppeteer, playwright, Cypress. These apps are difficult to set up. Viteshot is a super-fast webpack alternative. Viteshot can take many screenshots of individual components in very less time. It can be done even if the codebase of the application is very large. It is also easy to set up. You can use it with React, Solid, Svelte, Vue 3 and Preact. To install using NPM run the below lines of code.
# Install Viteshot. npm install --save-dev viteshot # NPM yarn add -D viteshot # Yarn pnpm add -D viteshot # PNPM
# Set up Viteshot configuration in your repository.
viteshot init
Then you need to export UI components from files with the .screenshot.jsx/tsx/vue/svelte extension.
You are ready to generate a screenshot using the following command.
# Take screenshots. viteshot > Capturing: src/__screenshots__/darwin/pixel2/App-App.png > Capturing: src/__screenshots__/darwin/laptop/App-App.png > Capturing: src/__screenshots__/darwin/pixel2/App-Clicked.png > Capturing: src/__screenshots__/darwin/laptop/App-Clicked.png > Capturing: src/__screenshots__/darwin/pixel2/App-Greet.png > Capturing: src/__screenshots__/darwin/laptop/App-Greet.png > Capturing: src/__screenshots__/darwin/laptop/App-HelloWorld.png > Capturing: src/__screenshots__/darwin/pixel2/App-HelloWorld.png > All done.
sam smith
16 Apr 2023
I just want the whole world to know about this spell caster I met two weeks ago, I cannot say everything he has done for me my wife left me 3 years ago left with my kids I was going through online when I meant this wonderful man's testimony online I decided to give it a try and my wife is back to me now and we are happily married again cause is too much to put in writing all I can say is thank you very much am very happy Contact him today on oseremenspelltemple@gmail.com or whatsapp him on +2348136482342. www.facebook.com/Dr-odion-spell-temple-110513923938220