Skip to content

Commit 36ff416

Browse files
committed
test(workflow-sdk): keep the source type-check command on the TypeScript the repo installs
SOURCE_TYPESCRIPT_VERSION says it is the release the declarations are checked against, but the devDependency is a caret range: a lockfile bump would send agents to another tsc than CI runs.
1 parent 550436e commit 36ff416

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { createRequire } from 'node:module'
2+
import { describe, expect, it } from 'vitest'
3+
import { typecheckCommand } from './tsconfig'
4+
5+
describe('typecheckCommand', () => {
6+
it('runs the TypeScript release this repository type-checks the generated declarations with', () => {
7+
const { version } = createRequire(import.meta.url)('typescript/package.json')
8+
expect(typecheckCommand()).toBe(`bunx -p typescript@${version} tsc -p .`)
9+
})
10+
})

0 commit comments

Comments
 (0)