The testing mechanism used creates sample test files with project.createSourceFile().
If the test project is not created without useInMemoryFileSystem: true option, then the test project will load all libraries, such as 'node_modules'. This surely slows down the test, but also can create problems when generating references.
For example, a sample variable named add for an arrow function gets a possible reference from domain.d.ts in the projects node_modules, because it defines an add with the same signature (?).
The testing mechanism used creates sample test files with
project.createSourceFile()
.If the test project is not created without
useInMemoryFileSystem: true
option, then the test project will load all libraries, such as 'node_modules'. This surely slows down the test, but also can create problems when generating references.For example, a sample variable named
add
for an arrow function gets a possible reference fromdomain.d.ts
in the projects node_modules, because it defines anadd
with the same signature (?).