Skip to content

Windows npm test fails when generating recursive CFF fixture #877

Description

@dajiaohuang

Expected Behavior

Running the test suite on Windows should generate all fixture fonts and continue into the Mocha suite.

Current Behavior

On Windows, npm test fails before the Mocha suite can start. test/generate-recursive-cff-font.mjs builds its output path with new URL( ./fonts/CFFRecursionTest.otf, import.meta.url).pathname. On Windows this produces a /D:/... pathname, and writeFileSync then attempts a path such as D:\D:\repo..., resulting in ENOENT.

Possible Solution

Use fileURLToPath(import.meta.url) with path.join, as the sibling fixture generators do.

Steps to Reproduce

  1. On Windows with Node v24.14.1 and npm 11.11.0, run npm ci in a clean checkout.
  2. Run npm test.
  3. Observe that the build steps complete, then Mocha fails while loading test/generate-recursive-cff-font.mjs.
  4. The error path contains a duplicated drive prefix, such as D:\D:\repo... .

Context

The existing CFF recursion regression test cannot run on Windows, reducing cross-platform test coverage.

Your Environment

  • Version used: current master at the captured audit commit
  • Font used: CFF recursion fixture
  • Browser Name and version: not applicable
  • Operating System and version: Windows worker, Node v24.14.1, npm 11.11.0
  • Link to your project: not applicable

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions