From 72f5719b3412da7840a7b85e4dce512ecbaece4d Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 16 Oct 2018 15:17:49 +0100 Subject: Added note about restriction on `testDirectory` --- packages/monorepo-scripts/src/test_installation.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'packages') diff --git a/packages/monorepo-scripts/src/test_installation.ts b/packages/monorepo-scripts/src/test_installation.ts index 9ef9e829b..a642498ac 100644 --- a/packages/monorepo-scripts/src/test_installation.ts +++ b/packages/monorepo-scripts/src/test_installation.ts @@ -104,6 +104,9 @@ async function testInstallPackageAsync( const packageName = installablePackage.packageJson.name; utils.log(`Testing ${packageName}@${lastChangelogVersion}`); const packageDirName = path.join(...(packageName + '-test').split('/')); + // NOTE(fabio): The `testDirectory` needs to be somewhere **outside** the monorepo root directory. + // Otherwise, it will have access to the hoisted `node_modules` directory and the Typescript missing + // type errors will not be caught. const testDirectory = path.join(monorepoRootPath, '..', '.installation-test', packageDirName); await rimrafAsync(testDirectory); await mkdirpAsync(testDirectory); -- cgit