compiler-and-fourslash-tests

Installation
SKILL.md

Writing, Running, and Debugging Compiler Tests and Fourslash Tests

This guide covers the complete testing workflow for the TypeScript repository, including compiler tests (type-checking, emit, diagnostics) and fourslash tests (language server features like completions, hover, go-to-definition).

1. Compiler Tests

Compiler tests validate the TypeScript compiler's behavior: diagnostics, JavaScript emit, source maps, type/symbol baselines, and more. Each test is a .ts or .tsx file that the test runner compiles, then compares output against stored baselines.

1.1 Where Test Files Live

Path Purpose
tsc/testdata/tests/cases/compiler/ Regression tests
tsc/testdata/tests/cases/conformance/ Conformance tests

1.2 Writing a New Compiler Test

A compiler test is just a .ts or .tsx file — no Go code needed. Place it in tsc/testdata/tests/cases/compiler/ for regression tests or tsc/testdata/tests/cases/conformance/<subdir>/ for conformance tests.

Installs
3
GitHub Stars
111.2K
First Seen
11 days ago
compiler-and-fourslash-tests — microsoft/typescript