explaingit

assaf/zombie

5,631JavaScriptAudience · developerComplexity · 2/5Setup · easy

TLDR

Zombie.js is a Node.js library that simulates a browser in memory so you can write automated web app tests that run fast, no real browser needed.

Mindmap

mindmap
  root((zombie.js))
    What it does
      In-memory browser
      Web app testing
      No real browser needed
    Capabilities
      Forms and buttons
      Cookies and redirects
      JavaScript execution
    Use cases
      Automated testing
      User flow testing
      CI pipeline tests
    Tech
      Node.js
      Works with Mocha
      npm install
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Write automated tests that fill out forms, click buttons, and check page content without launching a real browser.

USE CASE 2

Test multi-step user flows like signup, login, and checkout entirely in code with fast in-memory execution.

USE CASE 3

Intercept and modify HTTP requests in your tests using Zombie's pipeline system.

Tech stack

JavaScriptNode.js

Getting it running

Difficulty · easy Time to first run · 30min

Do not use Zombie to load pages from untrusted sources, their JavaScript runs in your test process.

License information is not clearly stated in the explanation.

In plain English

Zombie.js is a Node.js library for testing web applications without opening a real browser. It simulates a browser in memory: it loads pages, runs the JavaScript on those pages, manages cookies, and lets you interact with forms and links through code. Because no actual browser window opens, tests run much faster than with browser-based testing tools. The typical use case is automated testing of web application flows. You write a test that says: visit this page, fill in this form field with this value, click this button, and then assert that the resulting page shows what you expect. Zombie handles all the behind-the-scenes work of making HTTP requests, parsing HTML, and executing JavaScript, so you can check the outcome. The README includes a working example that signs up a user on a test server, verifies the request succeeded, and checks that the welcome page title is correct. Zombie works with standard Node.js testing frameworks. The examples in the README use Mocha, but the library itself does not require any specific framework. It is installed as a development dependency via npm. The library exposes a detailed API for interacting with page content: visiting URLs, pressing buttons, checking and unchecking checkboxes, selecting radio buttons, choosing dropdown options, attaching files to upload fields, evaluating arbitrary JavaScript in the page context, navigating browser history, and inspecting HTTP response codes, cookies, and redirects. There is also a pipeline system for intercepting and modifying HTTP requests and responses. A note in the README warns that using Zombie to load pages from untrusted sources is not safe, because the JavaScript on those pages runs in the same process as your tests. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
Using Zombie.js with Mocha, write a test that visits a signup page, fills in an email and password, submits the form, and asserts the welcome page title is correct.
Prompt 2
I want to test a login flow with Zombie.js. Show me how to set a cookie, visit a protected page, and verify I'm redirected if not authenticated.
Prompt 3
How do I intercept HTTP requests in Zombie.js to mock API responses during testing?
Prompt 4
I'm using Zombie.js for web app testing. Show me how to select a dropdown option, check a checkbox, and then verify the resulting page content.
Prompt 5
What are the tradeoffs between using Zombie.js versus Playwright or Puppeteer for automated web testing?
Open on GitHub → Explain another repo

← assaf on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.