@stencil/core 4.4.0-dev.1696395716.cd91c3e → 4.4.0-dev.1696568523.8d03606

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cli/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil CLI v4.4.0-dev.1696395716.cd91c3e | MIT Licensed | https://stenciljs.com
2
+ Stencil CLI v4.4.0-dev.1696568523.8d03606 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  import { parse, join, relative } from 'path';
5
5
 
@@ -2346,7 +2346,15 @@ const taskTest = async (config) => {
2346
2346
  return config.sys.exit(1);
2347
2347
  }
2348
2348
  try {
2349
- // let's test!
2349
+ /**
2350
+ * We dynamically import the testing submodule here in order for Stencil's lazy module checking to work properly.
2351
+ *
2352
+ * Prior to this call, we create a collection of string-based node module names and ensure that they're installed &
2353
+ * on disk. The testing submodule includes `jest` (amongst other) testing libraries in its dependency chain. We need
2354
+ * to run the lazy module check _before_ we include `jest` et al. in our dependency chain otherwise, the lazy module
2355
+ * checking would fail to run properly (because we'd import `jest`, which wouldn't exist, before we even checked if
2356
+ * it was installed).
2357
+ */
2350
2358
  const { createTesting } = await import('../testing/index.js');
2351
2359
  const testing = await createTesting(config);
2352
2360
  const passed = await testing.run(testingRunOpts);