To test a Vue.js app with Cypress, choose whether you need to mount one component in a real browser or exercise the running app end to end. For a focused component test, install Cypress, configure its Vue component runner with your project’s bundler, register cy.mount(), then mount the component and assert on what a user sees and does.
Choose component testing or end-to-end testing
| Approach | What runs | Best fit |
|---|---|---|
| Component Testing | An individual Vue component mounted directly in a real browser within Cypress’s test environment. | Check how a component renders, responds to props, and reacts to user actions. |
| End-to-end (E2E) testing | The application as a whole in a browser. | Check a user journey that depends on startup, routing, or integration across features. |
Cypress describes Component Testing as mounting components directly in a real browser rather than a simulated DOM. The two approaches answer different questions; a focused component test does not establish that the entire application workflow works, and an E2E test is not a substitute for every isolated component check. Cypress component testing overview · Cypress testing types.
Check Vue and bundler compatibility
As of October 2026, Cypress’s Vue component testing documentation describes support for Vue 3+ projects using Vite 8.x or Webpack 5+. These compatibility details can change; check the current Vue component testing guide against your project before configuring the runner.
The component dev server compiles spec and support files with the app’s development transforms and serves them to Cypress. Consequently, bundler configuration—including aliases and CSS transforms—can affect whether a component mounts successfully. See Cypress component framework configuration.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Install Cypress and configure Vue Component Testing
-
Add Cypress as a development dependency using your package manager. For npm, run
npm install --save-dev cypress. -
Open the Cypress app with
npx cypress open. In the Launchpad, choose Component Testing and follow its setup flow. Cypress’s getting-started guide covers the setup: Get started with component testing. -
Choose Vue as the framework and the bundler used by the project, Vite or Webpack. The component configuration identifies these with
framework: 'vue'and the relevant bundler configuration. Keep the test bundler settings aligned with the app’s actual transforms and aliases. -
Confirm that the generated component support and spec files are included in the configuration Cypress creates. Put reusable mount setup in the component support file; write component specs in the component test location configured for the project.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallSpecial offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
The exact generated file paths can vary with the project and Cypress setup, so use the paths shown by your Launchpad configuration rather than assuming a particular directory layout.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Register and use cy.mount()
Cypress exports Vue’s mount helper from cypress/vue. In the component support file, expose it as a Cypress command:
import { mount } from 'cypress/vue'
Cypress.Commands.add('mount', mount)
With TypeScript, Cypress may need a command type declaration matching the version and setup in use. Follow the current Vue API documentation for the supported declaration pattern.
A first test can mount a component, locate its visible control, interact with it, and assert on an observable result. For example, with a Stepper.vue component that accepts a starting value prop and emits change with the updated value:
import Stepper from './Stepper.vue'
describe('Stepper', () => {
it('emits the updated value when the user increments', () => {
const onChange = cy.spy().as('onChange')
cy.mount(Stepper, {
props: {
value: 3,
onChange,
},
})
cy.contains('button', 'Increment').click()
cy.get('@onChange').should('have.been.calledWith', 4)
})
})
This pattern checks the component’s public behavior: initialize it through a prop, perform a user action, and verify the event value. Cypress’s Vue examples use this style of prop, click, and spy assertion. Adapt the event prop and accessible query to the component’s actual API and rendered labels.
Provide the app setup a component needs
A component mounted by itself does not automatically inherit every plugin, global component, or parent wrapper registered by the application. Add only the setup that the component under test requires. If many tests need the same setup, customize the shared mount command rather than repeating registrations in every test.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Pinia, Vue I18n, and global components
Register required plugins and global components through the mount options or a customized mount command. Cypress’s Vue examples cover Pinia, Vue I18n, and global components; use the current examples to match the options supported by your Cypress and Vue versions.
Vue Router
When a component depends on router context, create a router for the test and install it when mounting. Cypress’s example uses memory history, avoiding dependence on a real browser navigation session. The test should provide the routes and initial location needed for the component’s behavior.
Recommended Free Tools
Vuex
For a Vuex-dependent component, create and register a store as part of test setup. Cypress notes that initializing a store per test avoids state changes leaking from one test into another.
Vuetify and required wrappers
Some UI frameworks expect components to sit inside a particular application hierarchy. Cypress’s Vuetify example wraps the mounted component in VApp; provide equivalent required wrappers for your own framework or component.
Nuxt
Cypress’s Vue component integration does not consume nuxt.config and has no dedicated Nuxt framework definition. For Nuxt 3+ component tests, configure the Vue/Vite component path directly. Nuxt aliases such as ~ and @, auto-imports, and plugins are not automatically available when mounting a component alone; add the needed aliases, imports, or plugin setup explicitly. Details are in the Cypress Vue overview.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Write assertions around user-visible behavior
-
Pass props or mount options to represent the state the component should handle.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
Query the rendered interface using a label, role, or visible text that reflects how a user would find the control.
-
Perform the interaction that matters, such as clicking a button.
-
Assert on a result the user or another part of the application can observe: changed text, an enabled control, navigation state, or an emitted event.
A passing isolated component test demonstrates that behavior under the setup and state supplied to the test. It does not by itself verify that the full application starts correctly or that all integrated features work together; use an E2E test when that broader path is the claim.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Troubleshoot common component-test failures
The component cannot be imported or mounted
Check that the Cypress component configuration uses Vue and the same bundler family as the app, and that the project meets the documented Vue and bundler compatibility. Also inspect bundler aliases and transforms: component specs and support files are compiled by the component dev server, so an app-only transform may not be applied automatically.
A plugin or global component is missing
Mount the component with the plugin or global registration it relies on, or add that setup to a shared mount command. If the component expects an application wrapper, reproduce that hierarchy in the test.
A Nuxt alias or auto-import is unresolved
Do not expect Cypress to read nuxt.config or provide Nuxt auto-imports in a standalone component test. Configure the needed alias or explicitly import and register the dependency in the component-test setup.
Tests affect one another through store state
Create a fresh store for each test when testing Vuex state. Apply the same isolation principle to other mutable test setup so one case does not depend on a previous test’s changes.
The event assertion never fires
Verify that the component actually emits the event prop used in the test, that the test passes the spy under the correct prop name, and that the click targets the intended rendered control. Assert the emitted value that the component contract promises.
Or skip the browser setup
If the task is to capture a webpage rather than test Vue component behavior, ScreenshotNeo is a website screenshot API and MCP server; it is not a replacement for Cypress tests. One GET request returns a PNG, JPEG, WebP, or PDF. For example, this cURL request saves a WebP screenshot:
Quick Recap
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. ScreenshotNeo removes cookie/consent banners, newsletter popups, and chat widgets before capture; each cleanup step can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for AI agents. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for 1,000 free screenshots a month, with no card.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.

