Added note about restriction on testDirectory

This commit is contained in:
Fabio Berger
2018-10-16 15:17:49 +01:00
parent e624587050
commit 72f5719b34

View File

@@ -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);