# Testing signals — lodash/lodash

> Canonical page: https://codevetter.com/unpack/lodash/testing-signals

# Testing signals — lodash/lodash

Scanned commit 2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8 (2026-09-11). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

Testing is QUnit 2 (`qunitjs` + `qunit-extras`) driven two ways: directly under Node via `node test/test` and `node test/test-fp`, and in browsers via Playwright asserting `0 failed` on four static pages. Coverage of the main library is very broad — 307 QUnit modules and ~1754 assertions in `test/test.js` alone, plus 85/134 for FP — and is supplemented by running the vendored Backbone and Underscore suites against lodash. Style is enforced by JSCS across `lodash.js`, `fp/`, `lib/`, `perf/` and `test/`, and docs are tested by executing every README code fence via `markdown-doctest`. The notable gaps are the `lib/` build scripts themselves and the Playwright runner's coarse assertion.
- `test/test.js` contains 307 `QUnit.module(` and 1754 `QUnit.test(` calls in a single 814 KB file; `test/test-fp.js` adds 85 modules and 134 tests. — [test/test.js#L764-800](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/test/test.js#L764-L800) [test/test-fp.js#L1780-1795](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/test/test-fp.js#L1780-L1795)
- `npm run validate` is the CI gate everywhere — it chains `npm run style` (four JSCS invocations) and `npm test` — and is what both `ci-node.yml` and `ci-bun.yml` run. — [package.json#L21-30](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/package.json#L21-L30) [.github/workflows/ci-node.yml#L58-59](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/.github/workflows/ci-node.yml#L58-L59) [.github/workflows/ci-bun.yml#L37-38](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/.github/workflows/ci-bun.yml#L37-L38)
- The Node matrix is exhaustive and non-fail-fast: Node 4 through 25 on ubuntu-latest, with a special step installing `npm@3.10.10` for Node 5 because of npm 3 package-format bugs. — [.github/workflows/ci-node.yml#L14-56](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/.github/workflows/ci-node.yml#L14-L56)
- Bun CI needs a workaround before it can install: it runs `npm i --lockfile-version 3 --package-lock-only` first because the committed `package-lock.json` is an older lockfile version, flagged with a TODO. — [.github/workflows/ci-bun.yml#L26-34](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/.github/workflows/ci-bun.yml#L26-L34)
- Browser coverage runs six Playwright projects (Chromium, Firefox, WebKit, Microsoft Edge via msedge channel, Mobile Safari/iPhone 12, Mobile Chrome/Pixel 5) with `retries: 2` under CI and a 120s per-test timeout chosen to exceed the 60s in-page wait. — [playwright.config.js#L6-30](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/playwright.config.js#L6-L30)
- Each Playwright spec asserts only that the literal text `0 failed` becomes visible — it does not read which tests ran, so a page that silently fails to load its suite and renders nothing will time out rather than report a specific failure. — [test/playwright-runner.spec.js#L5-13](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/test/playwright-runner.spec.js#L5-L13)
- Cross-library regression coverage: `test/backbone.html` runs Backbone's own 7 test files against lodash after `mixin`-ing 17 lodash methods and aliasing `indexBy`→`keyBy`, `invoke`→`invokeMap`, `rest`→`tail`. — [test/backbone.html#L29-98](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/test/backbone.html#L29-L98)
- `test/underscore.html` runs Underscore's 7 suites against lodash and carries a large `QUnit.config.excused` map enumerating known, accepted behavioral divergences (e.g. `chunk` size 0, `difference` OO-style, `drop` alias). — [test/underscore.html#L27-45](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/test/underscore.html#L27-L45) [test/underscore.html#L383-390](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/test/underscore.html#L383-L390)
- The suite tests lodash against a deliberately hostile environment: `addBizarroMethods` removes `Object.create`/`Symbol`/`getOwnPropertySymbols`, stubs `Promise`/`Set`/`WeakMap` with `noop`, makes `Map` return a plain object on first construction, and fakes `WinRTError` plus `global`/`exports`/`module`. — [test/index.html#L49-131](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/test/index.html#L49-L131)
- There is an explicit minification guard test asserting no exported method name is ≤2 characters except `_`, `at`, `eq`, `gt`, `lt` — catching accidentally shipped minified production builds. — [test/test.js#L16311-16327](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/test/test.js#L16311-L16327)
- Documentation is executable: `npm run test:doc` runs `markdown-doctest doc/*.md` with a setup file that deletes `global['__core-js_shared__']` and injects the real `_` plus `lodash-doc-globals` into every example's scope. — [package.json#L27](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/package.json#L27) [.markdown-doctest-setup.js#L1-11](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/.markdown-doctest-setup.js#L1-L11) [.github/workflows/ci-docs.yml#L25-29](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/.github/workflows/ci-docs.yml#L25-L29)
- JSCS enforces ~40 rules including `requireEarlyReturn`, `disallowKeywords: ["with"]`, `validateQuoteMarks: '`, 2-space indentation and JSDoc type/param/return checks, but with `maxErrors: 2000` so a large backlog can exist without failing. — [.jscsrc#L1-95](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/.jscsrc#L1-L95) [package.json#L21-25](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/package.json#L21-L25)
- Nothing under `lib/` is unit-tested — `style:fp` lints `lib/**/*.js` but no test file requires `lib/common/file.js`, `lib/common/minify.js` or any `build-*.js`; their only verification is that CI's build step doesn't throw. (inferred) — [package.json#L22](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/package.json#L22) [package.json#L26-29](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/package.json#L26-L29) [.github/workflows/ci-dist-sync.yml#L30-37](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/.github/workflows/ci-dist-sync.yml#L30-L37)
- Coverage tooling is declared (`istanbul`, `coveralls`, `codecov.io` devDependencies and a PhantomJS `__coverage__` collection path in `test.js`) but no npm script or workflow invokes it, so coverage is effectively dead infrastructure. (inferred) — [package.json#L37-40](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/package.json#L37-L40) [test/test.js#L269-284](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/test/test.js#L269-L284)
- CodeQL runs JavaScript analysis on every push/PR to `main` plus weekly on Mondays at 00:00, and OSSF Scorecard runs Tuesdays at 07:20 publishing SARIF to code scanning. — [.github/workflows/codeql.yml#L18-24](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/.github/workflows/codeql.yml#L18-L24) [.github/workflows/scorecards.yml#L5-12](https://github.com/lodash/lodash/blob/2b5e6f7399a7b48005140b5d5c6bc6c0e62919a8/.github/workflows/scorecards.yml#L5-L12)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
