The Meerako Testing Pyramid: Why Our 5.0★ Apps Don't Break
Quality isn't an accident. We show you our testing pyramid, from Unit Tests (Jest) to Integration and E2E Tests (Cypress/Playwright).

Meerako — Our 100% Satisfaction Guarantee is built on a foundation of 5.0★ quality and rigorous testing.
Introduction
"We'll fix it later." "We don't have time to write tests." "Just ship it." These are three of the most expensive sentences in software development, and the cost usually surfaces months later as a production incident nobody saw coming.
Our 5.0★ rating isn't an accident — it's the result of a disciplined, engineering-first culture built around a specific belief: untested code is broken code, whether or not the bug has been found yet. We structure our automated testing around the Testing Pyramid, a strategy that dictates how testing effort gets allocated to catch bugs before they ever reach a user. The tooling underneath that strategy has shifted meaningfully in the last two years, too — Vitest hit 14 million weekly npm downloads in early 2026, up from under 4 million just two years prior, and Playwright has overtaken Cypress in weekly downloads as the default choice for new end-to-end suites. We've moved with that shift on new projects while keeping Jest where it's still the right call, and this post lays out exactly how and why.
What You'll Learn
- What the Testing Pyramid actually is, and why the shape of it matters.
- What each layer — unit, integration, and end-to-end tests — is actually checking for.
- The specific tools we use at each layer in 2026, and why we chose them over the alternatives.
- How this connects directly into our CI/CD pipeline, not as a separate afterthought step.
- What a real defect-cost curve looks like, and why catching bugs early is a financial decision, not just an engineering preference.
The Concept: Many Fast Tests, Few Slow Ones
The Testing Pyramid's core idea: many small, fast tests at the base, progressively fewer, larger, and slower tests toward the top.
- Base (widest): unit tests — fast, cheap, run by the thousands.
- Middle: integration tests.
- Top (narrowest): end-to-end tests — slower, more expensive to run and maintain, used sparingly and deliberately.
Level 1: Unit Tests
What they check: a single, isolated piece of code — one function, one component — in complete isolation from everything else.
Our tools: Jest on established codebases, and increasingly Vitest on new projects. The shift matters in practice, not just on paper — Vitest typically runs three to five times faster than Jest thanks to native ESM support and Vite-powered module resolution, and it's now rated the highest-satisfaction testing tool in developer surveys, having gone from a newcomer to a genuine default in about two years. Jest, still the single most-downloaded test runner overall at roughly 32 million weekly downloads, remains our choice for React Native projects and any legacy codebase already built around Jest-specific plugins, where a migration wouldn't pay for itself.
A concrete example: for function add(a, b) { return a + b; }, the test is simply expect(add(2, 2)).toBe(4). For a React component, we test whether passing a specific name prop actually renders that name correctly.
Why they matter: unit tests run in seconds — we can execute thousands in a minute — and pinpoint exactly where something broke. This is the first line of defense, running automatically every time a developer commits, well before any human reviews the code.
Level 2: Integration Tests
What they check: whether two or more units work correctly together, not just correctly in isolation.
Our tools: Jest or Vitest (matching whichever the project's unit-test layer uses) plus React Testing Library.
A concrete example: clicking an "Add to Cart" button (one unit) should correctly update the Shopping Cart component's displayed count (a second unit) — testing the seam between them, not either piece alone.
Why they matter: most real bugs don't live inside a single function — they live at the boundaries where pieces connect, exactly where unit tests alone can't catch them.
Level 3: End-to-End (E2E) Tests
What they check: the entire system, exercised the way a real user actually would — an automated script that opens a real browser, navigates a live site, and performs a full user flow.
Our tools: Playwright, as our default on new projects, with Cypress retained on a handful of older codebases where it's already deeply embedded. This isn't a marginal preference — Playwright communicates with browsers directly through the native DevTools Protocol, while Cypress runs its test code inside the browser itself, a fundamental architectural difference that shows up as real limitations for Cypress: no genuine multi-tab support, and no true cross-browser execution from a single runner. Playwright supports all three major browser engines — Chromium, Firefox, and WebKit — with true parallelism and no paid tier required to get it, better TypeScript support out of the box, and noticeably less flakiness in our own experience running both side by side across client projects.
A concrete example flow: navigate to the site, click login, enter test credentials, submit, and assert the page now shows a personalized welcome message — verifying frontend, backend, database, and authentication are all genuinely working together, not just individually correct.
Why they matter: this is the ultimate smoke test, run before and after every production deployment, proving the system works end to end from an actual user's perspective, not just in isolated unit-level assumptions.
How This Becomes a Real Process, Not Just a Diagram
- CI/CD enforcement. No code merges unless 100% of unit and integration tests pass — our GitHub Actions pipeline enforces this automatically, with no manual override.
- Tests travel with the code, not after it. Developers hand off features to QA with the tests already written, not as a separate task assigned later.
- E2E tests double as demo scripts. They frequently form the backbone of our weekly Agile demos, proving to clients directly that a feature works in a real scenario, not just in a developer's local environment.
- Playwright's trace viewer and video recordings get attached automatically to any failed CI run, so debugging a flaky-looking failure doesn't require reproducing it locally first — a real time-saver we didn't have with our older Cypress-only pipelines.
Why the Pyramid Shape Specifically Matters
Teams sometimes invert this — writing mostly E2E tests because they feel most "realistic" — which produces a slow, brittle, expensive-to-maintain test suite that developers eventually start skipping under deadline pressure. The pyramid shape exists because unit tests catch the overwhelming majority of bugs cheaply and fast; E2E tests exist specifically for the smaller set of risks that only surface when the whole system runs together. A full E2E suite that takes twenty minutes to run doesn't just slow down CI — it changes developer behavior, because a slow feedback loop trains engineers to batch changes and test less frequently, which is the opposite of what you want from a testing strategy in the first place.
The Real Cost Curve: Why Catching Bugs Early Is a Financial Decision
This isn't just an engineering philosophy — it's a cost argument, and a fairly stark one. A bug caught by a unit test during development costs a developer minutes to fix, in the same context, with the relevant code already open in their editor. The same bug, if it survives to a staging environment, costs meaningfully more — someone has to reproduce it, trace it back through code they may not have written, and re-test the fix. If it survives all the way to production, the cost compounds again: a support ticket, an engineering investigation, a hotfix deployment, and in the worst cases, real damage to user trust that no amount of fast patching fully repairs. We treat the pyramid's investment in cheap, fast, early-layer tests as directly protecting a client's budget, not just our own engineering pride — every hour spent writing a good unit test is an hour that prevents several hours of much more expensive downstream debugging.
What a Realistic Pyramid Ratio Looks Like in Practice
The classic pyramid diagram is directionally right but rarely gives teams a concrete number to aim for, so here's roughly what we target on a typical mid-sized SaaS project: somewhere around 70% of the total test count as unit tests, 20% as integration tests, and the remaining 10% as end-to-end tests. On a codebase with a few thousand tests total, that might mean 2,000+ fast unit tests running in well under a minute, a few hundred integration tests covering component interactions and API contract behavior, and perhaps 50-100 E2E tests covering the handful of critical paths that actually matter — checkout, authentication, core CRUD flows for whatever the product's central object is. We don't chase a rigid ratio for its own sake, but when a project's test suite starts inverting toward more E2E tests than integration tests, that's a signal worth investigating, because it usually means engineers reached for a slow, expensive E2E test to verify something a cheap unit test could have caught just as reliably.
Common Testing Mistakes We Actively Guard Against
Testing implementation details instead of behavior. A unit test that breaks every time you refactor internal code without changing external behavior is testing the wrong thing — it should verify what the function or component does, not how it does it internally, or it becomes a maintenance burden that actively discourages healthy refactoring.
Flaky E2E tests that get ignored rather than fixed. Once a team starts treating a red E2E test as "probably just flaky, re-run it," the entire suite's credibility erodes fast, and genuine failures start slipping through re-runs along with the false positives. We treat flakiness as a bug in the test itself, not a fact of life to route around.
Skipping tests under deadline pressure "just this once." This is the single most common way a well-intentioned testing culture erodes over a few months — each skipped test feels justified in isolation, but the accumulated gap in coverage is exactly where the next production incident tends to live. Our CI gate exists specifically to remove this as a judgment call under pressure.
Frequently Asked Questions
How much test coverage is actually enough?
There's no single magic percentage — the right target is confidence that critical business logic and user flows are covered, not chasing a coverage number for its own sake, which can produce low-value tests that pad the metric without catching real bugs.
Do E2E tests replace the need for manual QA entirely?
No — automated E2E tests catch regressions in known flows reliably, but exploratory manual testing still catches edge cases and usability issues automated scripts aren't designed to find.
How long does a full test suite take to run in CI?
Unit and integration tests typically run in a couple of minutes; a full E2E suite can take longer, which is why we run E2E tests strategically (pre-deployment) rather than on every single commit.
What happens when a test fails in the pipeline?
The merge or deployment is blocked automatically until the failure is resolved — this is a hard gate, not a warning developers can bypass under time pressure.
Why did you move from Cypress to Playwright for new projects?
Mainly architecture — Playwright talks to the browser through the native DevTools Protocol rather than running inside it, which gives us genuine multi-tab and multi-browser testing, faster execution, and less flakiness in practice, alongside a broader industry shift reflected in Playwright's download numbers overtaking Cypress's in 2026.
Is Vitest a drop-in replacement for Jest on every project?
Mostly, given its Jest-compatible API, but not universally — we still default to Jest for React Native work and for legacy codebases with deep Jest-plugin dependencies, where migrating wouldn't be worth the disruption.
Conclusion
Our 100% Satisfaction Guarantee is possible because we have genuine confidence in the code we ship — and that confidence comes from a disciplined, automated testing strategy, not hope. Bugs caught in development cost a fraction of what the same bug costs once it's live in production. The Testing Pyramid, built today on a modern stack of Vitest, Jest, and Playwright, is our investment in avoiding that cost on your behalf.
Ready to build your product with a partner that is obsessed with quality?
Tags
Share this article
Meerako Team
Editorial Team
Practical guidance from Meerako's delivery team on software strategy, product execution, SEO, SaaS, AI, and modern engineering best practices.
Continue Reading
Related Articles
Adjacent topics and deeper implementation guides hand-picked for this article.

WebRTC and Real-Time Video: Building Video Features Into Your Product
Building genuine video calling or streaming features requires understanding WebRTC's real architecture, not just wiring up an SDK. Here's what actually goes into building this well.

Server Components in Next.js: What Actually Changes for Your Architecture
React Server Components fundamentally changed how Next.js applications are architected, not just how they're written. Here's what actually shifts, and what it means for your team.

Micro-Frontends Explained: When Breaking Up Your Frontend Actually Makes Sense
Micro-frontends solve real organizational scaling problems for large frontend teams, but add genuine complexity most teams don't need. Here's how to know if yours does.