Next.js starter your AI actually understands. Ship internal tools in days not weeks. Pre-order $199 $499 → [Get it now]

How to snapshot test Vue components

Snapshot tests capture the rendered output of components and alert you when it changes unexpectedly. As the creator of CoreUI with over 10 years of Vue.js experience since 2014, I’ve used snapshot testing to catch accidental regressions in UI components across hundreds of components. The standard approach uses @vue/test-utils to mount components and Vitest’s toMatchSnapshot to compare renders against stored snapshots. This provides an automatic safety net for your component’s output.

Read More…

How to archive repository in Git

Git archive creates compressed snapshots of repository contents without version control metadata, perfect for distribution packages and deployment artifacts. As the creator of CoreUI with 26 years of development experience, I’ve used git archive to generate release packages for applications serving millions of users, creating clean distribution files without .git directories that reduce package size by 90%.

The most reliable approach uses git archive with compression for specific commits or branches.

Read More…

How to snapshot test components in React

Snapshot testing in React captures component output and compares it against stored snapshots to catch unexpected UI changes. As the creator of CoreUI with over 12 years of React experience since 2014, I’ve used snapshot tests extensively to prevent UI regressions. Jest provides built-in snapshot testing that creates readable snapshots of React component trees and markup. This approach catches unintended changes in component structure, props, and rendered output without manual assertions.

Read More…