# Testing signals — d3/d3

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

# Testing signals — d3/d3

Scanned commit ca958d45217b4c15332d971b935451a6d4c978f4 (2026-05-28). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

Tests are Mocha plus ESLint, two files, no jsdom component suite and no image snapshots. test/d3-test.js checks that the barrel re-exports every dependency symbol except version. test/docs-test.js checks internal markdown links and anchors. CI on Node 20 runs eslint, the mocha suite, the Rollup build, and the docs build. Algorithm correctness is assumed to be tested in the individual d3-* repositories, which are not present here.
- The test script is mocha 'test/**/*-test.js' && eslint src test. Mocha is a devDependency at ^10.3.0. There is no .mocharc; both tests use the default BDD global it(). The only test files are test/d3-test.js and test/docs-test.js. — [package.json#L74-83](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/package.json#L74-L83) [test/d3-test.js#L1-19](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/test/d3-test.js#L1-L19) [test/docs-test.js#L1-29](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/test/docs-test.js#L1-L29)
- d3-test.js covers export parity only. It iterates package.json dependencies, dynamic-imports each package, and asserts every own enumerable export except the property named version is present on the umbrella namespace. It does not call the functions, does not check types, and does not compare behavior with the bundle in dist/. — [test/d3-test.js#L10-18](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/test/d3-test.js#L10-L18)
- docs-test.js covers internal documentation links. It fails when a relative link's pathname does not end in .md, or when the fragment is not in the anchors derived from ATX headers or {#id} markers. Absolute links with a scheme are skipped. HTML comments are removed before scanning, and directories whose names start with a dot (including docs/.vitepress) are not walked. — [test/docs-test.js#L4-73](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/test/docs-test.js#L4-L73)
- Header anchors are computed by stripping characters other than word characters, digits, and whitespace, trimming, collapsing spaces to hyphens, and lower-casing. Explicit anchors match / {#([\w\d-]+)}/. A link to a page with an empty hash is allowed because getAnchors seeds the list with "". — [test/docs-test.js#L31-47](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/test/docs-test.js#L31-L47)
- CI runs eslint twice. The workflow first runs yarn run eslint src test --format=compact after registering .github/eslint.json as an Actions problem matcher, then yarn test runs mocha and eslint again. It then runs yarn prepublishOnly and yarn docs:build, so a docs-build failure blocks the test workflow even though those steps are not unit tests. — [.github/workflows/test.yml#L19-25](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/.github/workflows/test.yml#L19-L25) [package.json#L83](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/package.json#L83) [.github/eslint.json#L2-16](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/.github/eslint.json#L2-L16)
- Lint config is split. The root .eslintrc.json extends eslint:recommended with sourceType module and ecmaVersion 8. test/.eslintrc.json uses ecmaVersion 11 and env es6, browser, and mocha so that it, window, and browser globals are defined in tests. — [.eslintrc.json#L1-7](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/.eslintrc.json#L1-L7) [test/.eslintrc.json#L1-13](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/test/.eslintrc.json#L1-L13)
- Nothing in test/ mounts Vue components, loads Rollup output, checks terser reserved names, hits the GitHub or Observable network loaders, or exercises geo, force, shape, or scale behavior. Those behaviors are documented against source files that live in other repositories, for example d3-fetch symbols link to https://github.com/d3/d3-fetch/blob/main/src/. — [test/d3-test.js#L10-18](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/test/d3-test.js#L10-L18) [test/docs-test.js#L4-6](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/test/docs-test.js#L4-L6) [docs/d3-fetch.md#L23-31](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/docs/d3-fetch.md#L23-L31)
- docs:build is part of CI, so VitePress compilation, the gallery.data.js network import, and stargazers.data.ts (which throws when CI is set and the GitHub request fails) are exercised on every push and pull request to main, but only as a build, not as assertions. — [.github/workflows/test.yml#L5-25](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/.github/workflows/test.yml#L5-L25) [docs/.vitepress/theme/stargazers.data.ts#L4-12](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/docs/.vitepress/theme/stargazers.data.ts#L4-L12) [docs/.vitepress/theme/gallery.data.js#L4-6](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/docs/.vitepress/theme/gallery.data.js#L4-L6)
- There is no coverage tool, no fixture directory, and no visual-regression harness in package.json. CHANGES.md explicitly defers minor and patch notes to GitHub releases and only records major breaking changes, so tests here are not a changelog oracle. — [package.json#L81-88](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/package.json#L81-L88) [CHANGES.md#L1-5](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/CHANGES.md#L1-L5)

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)
