cloudflare / cloudflare/cloudflare-os

pnpm test exits 0 without running tests on Windows

Open
#251 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
9.9k
Forks
1.2k
Avg merge
1d 20h
Merged PRs (30d)
107

Description

## Summary

On Windows, `pnpm test` exits successfully without running either the root script tests or any package test tasks.

At `3562627` on a fresh checkout, Windows 11, Node 24.19.0, and pnpm 11.17.0, the complete output reduces to:

```text
$ node --test 'scripts/**/*.test.ts' && vp run --filter '!cloudflare-os' --cache test

tests 0
suites 0
pass 0
fail 0

No packages matched the filter: '!cloudflare-os'
```

The command exits 0. By contrast, the same revision's Linux CI log shows 143 root tests followed by the package suites.

## What differs on Windows

There are two independent selection differences:

1. The forward-slash recursive test glob matches no files. Running the Windows-separator equivalent directly runs all 143 root tests successfully:

```text
node --test "scripts\**\*.test.ts"
tests 143
pass 143
fail 0
```

2. The negative-only Vite+ filter has no seed set on Windows, so it selects no packages. A positive directory selector such as `--filter "./packages/**"` does start the package test tasks.

## Remaining Windows failure after selecting the tests

Correcting only the selectors does not make the full command green on this host, so I am not presenting that as a complete fix.

In a fresh LF checkout, the corrected selectors ran the 143 root tests and the package suites, then the scheduler suite failed this concurrency assertion:

```text
ScheduleDriver > bounds callback concurrency and immediately continues a due backlog
expected maxActiveCallbacks 2 to be 4
```

With package concurrency limited to one, that scheduler suite passed, but the run is substantially slower. This leaves a maintainer choice between Windows-specific task concurrency, making the assertion portable, or another test-runner shape. The directly observed bug here is narrower: the documented `pnpm test` currently reports success on Windows while testing nothing.

AI tools assisted the investigation and drafting. The commands and counts above are from local runs, including the failing scheduler result rather than a predicted outcome.

Contributor guide

Open the contributing guide

Research direction

Start with the command behind `pnpm test`, the `scripts/**/*.test.ts` selector, and the Vite+ package filter; reproduce the Windows run and compare it with the Windows-separator and positive package selectors described here. Done means the command no longer reports success after running zero tests, while the scheduler concurrency failure is resolved or its maintainer-approved handling is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript, vite
Domain
build-system, testing, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.