Skip to content

Commit 40c73d0

Browse files
committed
comment on scaffoldCommonNodeModules
1 parent efcc5ef commit 40c73d0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

system-tests/lib/dep-installer/index.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,18 @@ export async function scaffoldProjectNodeModules (project: string, updateLockFil
257257
}
258258
}
259259

260+
/**
261+
* Create symlinks to very commonly used (in example projects) `node_modules`.
262+
*
263+
* This is done because many `projects` use the same modules, like `lodash`, and it's not worth it
264+
* to increase CI install times just to have it explicitly specified by `package.json`. A symlink
265+
* is faster than a real `npm install`.
266+
*
267+
* Adding modules here *decreases the quality of test coverage* because it allows test projects
268+
* to make assumptions about what modules are available that don't hold true in the real world. So
269+
* *do not add a module here* unless you are really sure that it should be available in every
270+
* single test project.
271+
*/
260272
export async function scaffoldCommonNodeModules () {
261273
await Promise.all([
262274
'@cypress/code-coverage',

0 commit comments

Comments
 (0)