From 4b73aa153eb079e32e54b9dbcc7dac8b6fdb805a Mon Sep 17 00:00:00 2001 From: Tianyi Cui <53024+tianyicui@users.noreply.github.com> Date: Sat, 8 Aug 2026 14:29:09 +0800 Subject: [PATCH] test(gates): isolate TypeRT graph assertions --- scripts/run-gates.spec.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/run-gates.spec.ts b/scripts/run-gates.spec.ts index d0389af483..e45383b481 100644 --- a/scripts/run-gates.spec.ts +++ b/scripts/run-gates.spec.ts @@ -144,7 +144,8 @@ describe('Oxlint gate', () => { describe('TypeRT contract preparation', () => { it('prepares primary source consumers once before they run', () => { - const subject = withPnpmEntrypoint(() => gatesForMode('ci-primary')) + const subject = withEnv('DSH_OXLINT_THREADS', undefined, () => + withPnpmEntrypoint(() => gatesForMode('ci-primary'))) expect(subject.find(item => item.id === 'typert-contracts')).toMatchObject({ displayCommand: 'pnpm run build:lib:host', @@ -182,10 +183,11 @@ describe('TypeRT contract preparation', () => { }) it('keeps standalone aggregates responsible for preparation', () => { - const lint = withPnpmEntrypoint(() => gatesForMode('ci-lint')[0]) - const preparedLint = withPnpmEntrypoint(() => gatesForMode('ci-lint-contracts-ready')[0]) - const docTypecheck = withPnpmEntrypoint(() => - gatesForMode('doc-sync').find(item => item.id === 'doc-typecheck')) + const [lint, preparedLint, docTypecheck] = withEnv('DSH_OXLINT_THREADS', undefined, () => [ + withPnpmEntrypoint(() => gatesForMode('ci-lint')[0]), + withPnpmEntrypoint(() => gatesForMode('ci-lint-contracts-ready')[0]), + withPnpmEntrypoint(() => gatesForMode('doc-sync').find(item => item.id === 'doc-typecheck')), + ]) expect(lint?.displayCommand).toBe('pnpm run lint') expect(preparedLint?.displayCommand).toBe('pnpm run lint:contracts-ready')