microsoft / microsoft/TypeScript

Move test files and baselines into subdirectories

Open
#42,496 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Experience Enhancement Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

Bug Report

VSCode can't really handle the number of files in the tests/cases/compiler directory (5386) or tests/baselines/reference (36655). It makes working with those directories very awkward!

There's plenty of scope for subdirectories, e.g.

anyAndUnknownHaveFalsyComponents.ts
anyAsReturnTypeForNewOnCall.ts
anyDeclare.ts
anyIdenticalToItself.ts
anyIndexedAccessArrayNoException.ts
anyInferenceAnonymousFunctions.ts
anyIsAssignableToObject.ts
anyIsAssignableToVoid.ts
anyMappedTypesError.ts
anyPlusAny1.ts
argsInScope.ts
arguments.ts
argumentsAsPropertyName.ts
argumentsAsPropertyName2.ts
argumentsBindsToFunctionScopeArgumentList.ts
argumentsObjectCreatesRestForJs.ts
argumentsObjectIterator01_ES5.ts
argumentsObjectIterator01_ES6.ts
argumentsObjectIterator02_ES5.ts
argumentsObjectIterator02_ES6.ts
argumentsObjectIterator03_ES5.ts
argumentsObjectIterator03_ES6.ts
argumentsReferenceInConstructor1_Js.ts
argumentsReferenceInConstructor2_Js.ts
argumentsReferenceInConstructor3_Js.ts
argumentsReferenceInConstructor4_Js.ts
argumentsReferenceInConstructor5_Js.ts
argumentsReferenceInConstructor6_Js.ts
argumentsReferenceInConstructor7_Js.ts
argumentsReferenceInMethod1_Js.ts
argumentsReferenceInMethod2_Js.ts
argumentsReferenceInMethod3_Js.ts
argumentsReferenceInMethod4_Js.ts
argumentsReferenceInMethod5_Js.ts
argumentsReferenceInMethod6_Js.ts
argumentsReferenceInMethod7_Js.ts
argumentsUsedInObjectLiteralProperty.ts
arithAssignTyping.ts
arithmeticOnInvalidTypes.ts
arithmeticOnInvalidTypes2.ts
arityErrorRelatedSpanBindingPattern.ts
arrayAssignmentTest1.ts
arrayAssignmentTest2.ts
arrayAssignmentTest3.ts
arrayAssignmentTest4.ts
arrayAssignmentTest5.ts
arrayAssignmentTest6.ts

Could be in these subdirectories

any
arguments
arithmetic
arity
arrayAssignment

I think that would cut down the number of subdirectories to something like 1000 which is much more reasonable. It could be a mostly automated change since the tests are named nicely and in most cases you could just group them by their first word (or maybe even first 1/2 letters?).

🔎 Search Terms

large number many files test cases baselines

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the layout and path assumptions around tests/cases/compiler and tests/baselines/reference, including how compiler tests locate their baselines. Group the test files and corresponding baselines into consistent subdirectories, then verify that the compiler test suite still discovers tests and matches every baseline after the move.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.