Skip to main content
ProductsDesktop toolsTASTECADDrawing reviewTASTEFILESFile managementTASTEFTPFile transferTASTESSHRemote workspaceTASTEZIPCompression and extractionTASTEWINMFile managementDeveloper toolsTASTECODERust integrated development environmentTASTESTUDIOIntegrated development and test environmentTASTEETLData integration (ETL)ServersTASTEREMOTERemote desktop serverTASTEGEOGeospatial serverTASTEMAILMail workspaceInvestingTASTESTOCKStock auto-trading desktop appGet startedDownloadsDocumentationBuyAll products
Marketplace
News
TechNewsToday's dev newsDeveloper docsProgramming languagesRustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartWeb front-end frameworksNext.jsReactVue.js · NuxtSvelteKitAngularServer frameworksSpring BootDjangoFastAPIASP.NET CoreNestJS · ExpressApp & desktop frameworksTauriFlutterReact NativeElectronAlgorithmsAlgorithm basicsCore algorithmsAdvanced algorithmsPractical algorithms
CommunityProjectsDevelopment logsPromptsAI tool issuesShowcaseCommunity guide
Work with usTech transferWebsite buildDesktop app buildRelease and payment pipelineSales partnerContact
ServicesRemote desktopCustom installer packages
TASTEDEV
Products

Desktop tools

TASTECADComplex drawings, opened with easeTASTEFILESJust the files you need, as fast as possibleTASTEFTPThe tidiest path for your filesTASTESSHA stronger link between you and your serversTASTEZIPPack faster, unpack saferTASTEWINMA keyboard-first file manager with two panes

Developer tools

TASTECODEEdit, build, debug and test Rust apps in one windowTASTESTUDIOFrom editing to remote tests and approved AI fixesTASTEETLMove data while you watch the values

Servers

TASTEREMOTEA remote desktop you run on your own serverTASTEGEORebuilding a GeoServer-compatible geospatial server in RustTASTEMAILTake back control of your email

Investing

TASTESTOCKStock auto-trading that follows the rules you set: when, and what

Get started

DownloadsLatest builds of every productDocsHow to use each productBuySubscriptions and perpetual licencesAll productsEvery product at a glance
All products
MarketplaceNews
Tech

News

Today's dev newsOfficial announcements on languages, frameworks, GitHub and AIDeveloper docsGuides to languages, frameworks and algorithms

Programming languages

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

Frameworks

Web front-end frameworksNext.jsReactVue.js · NuxtSvelteKitAngular
Server frameworksSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
App & desktop frameworksTauriFlutterReact NativeElectron

Algorithms

Algorithm basicsComplexity analysis · Sorting · Searching · Basic data structures · Trees and heapsCore algorithmsGraph traversal · Shortest paths & minimum spanning trees · Dynamic programming · Greedy algorithms · Divide and conquer · BacktrackingAdvanced algorithmsString algorithms · Math and number theory · Bit manipulation · Segment trees · Union-findPractical algorithmsCoding interview strategy · LRU cache · Rate limiting · Consistent hashing
All development docs
Community
ProjectsDiscover builders and their workDevelopment logsDecisions and lessons learnedPromptsReusable instructionsAI tool issuesProblems and workarounds for Claude, Codex, GeminiShowcaseFinished resultsCommunity guideHow we build in the open
Work with us
Tech transferNative apps in Rust and eguiWebsite build10 languages, accounts, docs and downloadsDesktop app buildRust and egui, no WebViewRelease and payment pipelineSigning, MSI, deb, rpm, AppImage, hashesSales partnerRecommend us and earn 30%ContactBuilds, partnerships and investment
Services
Remote desktopReach your computer from a browserCustom installer packagesOnly the features you need, settings preloaded
Buy
EN
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
Log in
Log in
TASTEDEV

From small tools to better development.

support@tastedev.netSupport TASTEDEV
ProductsProduct lineupBuyDocsDownloadsMarketplaceSupport
CommunityProjectsDevelopment logsPromptsAI tool issuesShowcase
PoliciesAbout usPrivacy policyTerms of serviceSubscription termsRefund policyCommunity guidelines
AccountLog inSign up
Visitors
Today
Yesterday
Total views
Company
GXSOFT
Representative
CHOI YOUNG GU
Business registration number
853-44-00368
Address
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
Phone
+82-10-4404-1523
Email
whitecalvin@tastedev.net
Privacy officer
CHOI YOUNG GU

© 2026 TASTEDEVProduct information is based on verified development sources.Released · improving

Vue.js · Nuxt docs
Vue.js · Nuxt
Getting Started with Vue and NuxtProject StructureCore Concepts: SFCs, Reactivity, Components, Nuxt RoutingData and StateTestingBuild and Deployment
Discussions

Vue.js · Nuxt guide · 5/6

Testing

Tests in a Vue project usually come in three layers. Pure logic such as composables and stores is checked with Vitest, components with Vitest plus Vue Test Utils, and real user flows with an end-to-end tool such as Playwright. In Nuxt projects, @nuxt/test-utils boots a Nuxt environment inside your tests.

Setting up Vitest

If you selected Vitest in create-vue, everything is already configured. To add it by hand, install these packages:

npm install -D vitest @vue/test-utils jsdom

vitest.config.ts extends the Vite config and selects the jsdom environment, which emulates browser APIs:

import { fileURLToPath } from "node:url";
import { mergeConfig, defineConfig, configDefaults } from "vitest/config";
import viteConfig from "./vite.config";

export default mergeConfig(
  viteConfig,
  defineConfig({
    test: {
      environment: "jsdom",
      exclude: [...configDefaults.exclude, "e2e/**"],
      root: fileURLToPath(new URL("./", import.meta.url)),
    },
  }),
);

npm run test:unit (or npx vitest) runs tests in watch mode, re-running only the affected tests each time you save.

Testing logic and stores

Call a composable like any function and assert on the result. For Pinia stores, activate a fresh Pinia before each test so tests do not leak state into each other.

import { describe, it, expect, beforeEach } from "vitest";
import { setActivePinia, createPinia } from "pinia";
import { useCounter } from "@/composables/useCounter";
import { useCartStore } from "@/stores/cart";

describe("useCounter", () => {
  it("increments and doubles", () => {
    const { count, double, increment } = useCounter(1);
    increment();
    expect(count.value).toBe(2);
    expect(double.value).toBe(4);
  });
});

describe("cart store", () => {
  beforeEach(() => setActivePinia(createPinia()));

  it("increases quantity for the same item", () => {
    const cart = useCartStore();
    cart.add({ id: 1, name: "Book", price: 100 });
    cart.add({ id: 1, name: "Book", price: 100 });
    expect(cart.items[0].qty).toBe(2);
    expect(cart.total).toBe(200);
  });
});

Testing components

mount from Vue Test Utils renders a component and returns a wrapper. Pass props, find elements, trigger events, then assert on the rendered text or emitted events. DOM updates are asynchronous, so await calls to trigger and setValue.

import { describe, it, expect } from "vitest";
import { mount } from "@vue/test-utils";
import TodoItem from "@/components/TodoItem.vue";

describe("TodoItem", () => {
  it("renders the text and emits remove", async () => {
    const wrapper = mount(TodoItem, { props: { text: "Groceries", done: false } });

    expect(wrapper.text()).toContain("Groceries");

    await wrapper.find("button").trigger("click");
    expect(wrapper.emitted("remove")?.[0]).toEqual(["user"]);
  });
});

Components that rely on global plugins can receive them with mount(Comp, { global: { plugins: [router, createPinia()] } }). Tests that assert on what the user sees, rather than on implementation details, survive refactoring much better.

Nuxt test utilities

Nuxt components depend on auto-imports and Nuxt composables, so they will not run in a plain jsdom environment. @nuxt/test-utils provides a nuxt environment that boots the Nuxt runtime inside tests, plus mountSuspended.

npm install -D @nuxt/test-utils vitest @vue/test-utils happy-dom
// vitest.config.ts
import { defineVitestConfig } from "@nuxt/test-utils/config";

export default defineVitestConfig({
  test: { environment: "nuxt" },
});
// tests/counter.nuxt.test.ts
import { it, expect } from "vitest";
import { mountSuspended } from "@nuxt/test-utils/runtime";
import AppCounter from "~/components/AppCounter.vue";

it("renders inside the Nuxt environment", async () => {
  const wrapper = await mountSuspended(AppCounter);
  expect(wrapper.text()).toContain("0");
});

mountSuspended waits for async setup and useFetch to resolve before returning. You can mock server API calls with registerEndpoint.

End-to-end tests with Playwright

End-to-end tests open the app in a real browser and drive it like a user would. Select Playwright in create-vue, or add it with npm init playwright@latest.

// e2e/home.spec.ts
import { test, expect } from "@playwright/test";

test("filters the list by search query", async ({ page }) => {
  await page.goto("/");
  await page.getByPlaceholder("Search").fill("Vue");
  await expect(page.getByRole("listitem")).toHaveCount(1);
});

Set the webServer option in playwright.config.ts to the command that starts your dev or preview server, and Playwright launches it before the tests. Run npx playwright test, and add --ui to step through tests interactively.

Summary

  • Check logic, stores and components quickly with Vitest and Vue Test Utils.
  • In Pinia store tests, call setActivePinia(createPinia()) before each test.
  • Test Nuxt components with the nuxt environment and mountSuspended from @nuxt/test-utils.
  • Verify critical user flows in a real browser with Playwright end-to-end tests.
Questions about this chapter?
Previous chapterData and StateNext chapterBuild and Deployment

0 comments

Top commentsNewest first

Sign in · Sign in to leave a comment.