@nestjs/testing 10.4.11 → 11.0.0-next.1
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/package.json
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TestingLogger = void 0;
|
|
4
|
-
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
5
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
6
4
|
const common_1 = require("@nestjs/common");
|
|
7
5
|
/**
|
|
8
6
|
* @publicApi
|
package/testing-injector.js
CHANGED
|
@@ -35,6 +35,9 @@ class TestingInjector extends injector_1.Injector {
|
|
|
35
35
|
metatype: wrapper.metatype,
|
|
36
36
|
});
|
|
37
37
|
const internalCoreModule = this.container.getInternalCoreModuleRef();
|
|
38
|
+
if (!internalCoreModule) {
|
|
39
|
+
throw new Error('Expected to have internal core module reference at this point.');
|
|
40
|
+
}
|
|
38
41
|
internalCoreModule.addCustomProvider({
|
|
39
42
|
provide: name,
|
|
40
43
|
useValue: mockedInstance,
|