fix(dev-infra): do not include all types in api golden test (#42828)
The API golden test tool should not include all types from the `node_modules/`. This results in unnecessary type resolution when the API golden tool is run outside of sandbox (i.e. on windows or with `bazel run` for accept). PR Close #42828
This commit is contained in:
parent
9456eca7c5
commit
867000efcc
|
@ -41,7 +41,12 @@ export async function testApiGolden(
|
||||||
const tempDir = process.env.TEST_TMPDIR ?? process.cwd();
|
const tempDir = process.env.TEST_TMPDIR ?? process.cwd();
|
||||||
|
|
||||||
const configObject: IConfigFile = {
|
const configObject: IConfigFile = {
|
||||||
compiler: {overrideTsconfig: {files: [indexFilePath]}},
|
compiler: {
|
||||||
|
overrideTsconfig:
|
||||||
|
// We disable inclusion of all `@types` installed as this throws-off API reports
|
||||||
|
// and causes different goldens when the API test is run outside sandbox.
|
||||||
|
{files: [indexFilePath], compilerOptions: {types: [], lib: ['esnext', 'dom']}}
|
||||||
|
},
|
||||||
projectFolder: dirname(packageJsonPath),
|
projectFolder: dirname(packageJsonPath),
|
||||||
mainEntryPointFilePath: indexFilePath,
|
mainEntryPointFilePath: indexFilePath,
|
||||||
dtsRollup: {enabled: false},
|
dtsRollup: {enabled: false},
|
||||||
|
|
Loading…
Reference in New Issue