Skip to content

test(autoCombo): port models_dev_tier #11508 guard from node:test to vitest - #11635

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.51from
jonlwheat2-gif:fix/vitest-models-dev-tier-suite
Aug 26, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.51from
jonlwheat2-gif:fix/vitest-models-dev-tier-suite

Conversation

@jonlwheat2-gif

Copy link
Copy Markdown
Contributor

Fixes the Vitest (fast-path) base-red on release/v3.8.51 (tracked under #11449; surfaced on PR #11633's run).

Root cause

tests/unit/autoCombo/models-dev-tier-11508.test.ts imports describe / it / before from node:test, but the directory is collected exclusively by vitest:

  • vitest.mcp.config.ts includes "tests/unit/autoCombo/**/*.test.ts".
  • The Node-native runner (test:unit) only globs tests/unit/*.test.ts, tests/unit/dashboard/**, and tests/unit/**/*.test.mjs — it never sees this file.
  • Every sibling in tests/unit/autoCombo/ imports from "vitest".

Result: vitest collects the file, registers zero suites, and fails the whole job with No test suite found in file ... models-dev-tier-11508.test.ts, while the node:test callbacks leak their own spec output into the vitest log. The suite has effectively never been counted by either runner.

Fix

Port the imports to vitest — before → beforeAll; keep node:assert/strict (runner-agnostic). No assertion or seeding logic changed. 2-line diff.

Verification

# pristine origin/release/v3.8.51 (broken):
Test Files  1 failed | 48 passed (49)
Tests       452 passed

# this branch:
Test Files  49 passed (49)
Tests       457 passed   # +5: this file's tests now actually register

Note: the other failing fast-path job on that run (Docs Gates — provider-count 353→354 drift) is a separate concern and needs its own docs-sync fix.

…ode:test to vitest

tests/unit/autoCombo/** is collected exclusively by vitest
(vitest.mcp.config.ts include 'tests/unit/autoCombo/**/*.test.ts';
test:unit only globs tests/unit/*.test.ts + dashboard/) and every
sibling in that directory imports from 'vitest'. This one file
imported describe/it/before from 'node:test' instead, so vitest
registered zero suites and failed the whole fast-path job with
'No test suite found' — while the node:test callbacks leaked their
own spec output into the vitest log.

Port the imports (before -> beforeAll; keep node:assert/strict,
runner-agnostic). No assertion changed.

Evidence: npm run test:vitest on pristine origin/release/v3.8.51
fails this suite identically (1 failed / 48 passed, 452 tests);
after the port: 49 files passed, 457 tests passed.
@diegosouzapw
diegosouzapw merged commit 71fd806 into diegosouzapw:release/v3.8.51 Aug 26, 2026
7 checks passed
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…ode:test to vitest (diegosouzapw#11635)

Merged via /merge-batch (2026-08-26, v3.8.51). Validado com o config correto (`vitest run --config vitest.mcp.config.ts`, que já inclui `tests/unit/autoCombo/**/*.test.ts`): 5/5 testes passando. Obrigado por destravar esse base-red.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants