feat(#1132): complete contribution hook prerequisite

Closes #1132
This commit is contained in:
Tom Boucher
2026-06-12 18:39:57 -04:00
committed by GitHub
parent 1d90ad3c30
commit fd01e7a12e
8 changed files with 347 additions and 24 deletions

View File

@@ -0,0 +1,28 @@
'use strict';
const { test } = require('node:test');
const assert = require('node:assert/strict');
const path = require('node:path');
const { spawnSync } = require('node:child_process');
test('root tsconfig supports the default no-emit typecheck command', () => {
const root = path.join(__dirname, '..');
const tscBin = path.join(root, 'node_modules', 'typescript', 'bin', 'tsc');
const result = spawnSync(process.execPath, [tscBin, '--noEmit'], {
cwd: root,
encoding: 'utf8',
});
assert.equal(
result.status,
0,
[
'Expected the default root TypeScript typecheck to pass.',
'stdout:',
result.stdout,
'stderr:',
result.stderr,
].join('\n'),
);
});