@nestjs/testing 12.0.0-alpha.3 → 12.0.0-alpha.5

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/Readme.md CHANGED
@@ -129,6 +129,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
129
129
  <tr>
130
130
  <td align="center" valign="middle"><a href="https://solcellsforetag.se/" target="_blank"><img src="https://nestjs.com/img/logos/solcellsforetag-logo.svg" width="140" valign="middle" /></a></td>
131
131
  <td align="center" valign="middle"><a href="https://www.route4me.com/" target="_blank"><img src="https://nestjs.com/img/logos/route4me-logo.svg" width="100" valign="middle" /></a></td>
132
+ <td align="center" valign="middle"><a href="https://memory2.co/" target="_blank"><img src="https://images.opencollective.com/memory-squared/bbe37f5/avatar/256.png?height=50" width="50" valign="middle" /></a></td>
132
133
  </tr>
133
134
  </table>
134
135
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/testing",
3
- "version": "12.0.0-alpha.3",
3
+ "version": "12.0.0-alpha.5",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@testing)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "license": "MIT",
@@ -41,5 +41,5 @@
41
41
  "optional": true
42
42
  }
43
43
  },
44
- "gitHead": "1c9d5482a65a446ede8dd1195bfa1cbbc16e0857"
44
+ "gitHead": "d91b72cc9567e6a09e3ad6075b2fb801e71adfc8"
45
45
  }
package/testing-module.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Logger, } from '@nestjs/common';
2
2
  import { NestApplication, NestApplicationContext, } from '@nestjs/core';
3
- import { loadPackage, loadPackageCached, isUndefined, } from '@nestjs/common/internal';
3
+ import { tryLoadPackage, loadPackageCached, isUndefined, } from '@nestjs/common/internal';
4
4
  /**
5
5
  * @publicApi
6
6
  */
@@ -19,9 +19,8 @@ export class TestingModule extends NestApplicationContext {
19
19
  * Called from TestingModuleBuilder.compile().
20
20
  */
21
21
  async preloadLazyPackages() {
22
- // Best-effort: silently swallow if packages are not installed
23
- await loadPackage('@nestjs/platform-express', 'TestingModule', () => import('@nestjs/platform-express')).catch(() => { });
24
- await loadPackage('@nestjs/microservices', 'TestingModule', () => import('@nestjs/microservices')).catch(() => { });
22
+ await tryLoadPackage('@nestjs/platform-express', () => import('@nestjs/platform-express'));
23
+ await tryLoadPackage('@nestjs/microservices', () => import('@nestjs/microservices'));
25
24
  }
26
25
  isHttpServer(serverOrOptions) {
27
26
  return !!(serverOrOptions && serverOrOptions.patch);