@nestjs/testing
Advanced tools
Comparing version 9.3.5 to 9.3.6
{ | ||
"name": "@nestjs/testing", | ||
"version": "9.3.5", | ||
"version": "9.3.6", | ||
"description": "Nest - modern, fast, powerful node.js web framework (@testing)", | ||
@@ -5,0 +5,0 @@ "author": "Kamil Mysliwiec", |
@@ -13,3 +13,2 @@ import { LoggerService, ModuleMetadata } from '@nestjs/common'; | ||
private readonly container; | ||
private readonly injector; | ||
private readonly overloadsMap; | ||
@@ -27,3 +26,3 @@ private readonly module; | ||
overrideProvider<T = any>(typeOrToken: T): OverrideBy; | ||
compile(options?: Pick<NestApplicationContextOptions, 'snapshot'>): Promise<TestingModule>; | ||
compile(options?: Pick<NestApplicationContextOptions, 'snapshot' | 'preview'>): Promise<TestingModule>; | ||
private override; | ||
@@ -30,0 +29,0 @@ private createOverrideByBuilder; |
@@ -23,3 +23,2 @@ "use strict"; | ||
this.container = new container_1.NestContainer(this.applicationConfig); | ||
this.injector = new testing_injector_1.TestingInjector(); | ||
this.overloadsMap = new Map(); | ||
@@ -65,3 +64,3 @@ this.module = this.createModule(metadata); | ||
this.applyOverloadsMap(); | ||
await this.createInstancesOfDependencies(graphInspector); | ||
await this.createInstancesOfDependencies(graphInspector, options); | ||
scanner.applyApplicationProviders(); | ||
@@ -94,4 +93,8 @@ const root = this.getRootModule(); | ||
} | ||
async createInstancesOfDependencies(graphInspector) { | ||
const instanceLoader = new testing_instance_loader_1.TestingInstanceLoader(this.container, this.injector, graphInspector); | ||
async createInstancesOfDependencies(graphInspector, options) { | ||
var _a; | ||
const injector = new testing_injector_1.TestingInjector({ | ||
preview: (_a = options === null || options === void 0 ? void 0 : options.preview) !== null && _a !== void 0 ? _a : false, | ||
}); | ||
const instanceLoader = new testing_instance_loader_1.TestingInstanceLoader(this.container, injector, graphInspector); | ||
await instanceLoader.createInstancesOfDependencies(this.container.getModules(), this.mocker); | ||
@@ -98,0 +101,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37448
440