@nestjs/testing 9.3.1 → 9.3.3

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
@@ -11,7 +11,6 @@
11
11
  <a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
12
12
  <a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
13
13
  <a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
14
- <a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
15
14
  <a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
16
15
  <a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
17
16
  <a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /*
3
3
  * Nest @testing
4
- * Copyright(c) 2017 - 2022 Kamil Mysliwiec
4
+ * Copyright(c) 2017 - 2023 Kamil Mysliwiec
5
5
  * https://nestjs.com
6
6
  * MIT Licensed
7
7
  */
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @publicApi
3
+ */
1
4
  export interface OverrideByFactoryOptions {
2
5
  factory: (...args: any[]) => any;
3
6
  inject?: any[];
@@ -1,5 +1,8 @@
1
1
  import { TestingModuleBuilder } from '../testing-module.builder';
2
2
  import { OverrideByFactoryOptions } from './override-by-factory-options.interface';
3
+ /**
4
+ * @publicApi
5
+ */
3
6
  export interface OverrideBy {
4
7
  useValue: (value: any) => TestingModuleBuilder;
5
8
  useFactory: (options: OverrideByFactoryOptions) => TestingModuleBuilder;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/testing",
3
- "version": "9.3.1",
3
+ "version": "9.3.3",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@testing)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "license": "MIT",
@@ -17,7 +17,7 @@
17
17
  "access": "public"
18
18
  },
19
19
  "dependencies": {
20
- "tslib": "2.4.1"
20
+ "tslib": "2.5.0"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "@nestjs/common": "^9.0.0",
@@ -1,4 +1,7 @@
1
1
  import { ConsoleLogger } from '@nestjs/common';
2
+ /**
3
+ * @publicApi
4
+ */
2
5
  export declare class TestingLogger extends ConsoleLogger {
3
6
  constructor();
4
7
  log(message: string): void;
@@ -4,6 +4,9 @@ exports.TestingLogger = void 0;
4
4
  /* eslint-disable @typescript-eslint/no-empty-function */
5
5
  /* eslint-disable @typescript-eslint/no-unused-vars */
6
6
  const common_1 = require("@nestjs/common");
7
+ /**
8
+ * @publicApi
9
+ */
7
10
  class TestingLogger extends common_1.ConsoleLogger {
8
11
  constructor() {
9
12
  super('Testing');
@@ -3,6 +3,9 @@ import { Injector, InjectorDependencyContext } from '@nestjs/core/injector/injec
3
3
  import { InstanceWrapper } from '@nestjs/core/injector/instance-wrapper';
4
4
  import { Module } from '@nestjs/core/injector/module';
5
5
  import { MockFactory } from './interfaces';
6
+ /**
7
+ * @publicApi
8
+ */
6
9
  export declare class TestingInjector extends Injector {
7
10
  protected mocker?: MockFactory;
8
11
  protected container: NestContainer;
@@ -4,6 +4,9 @@ exports.TestingInjector = void 0;
4
4
  const constants_1 = require("@nestjs/core/injector/constants");
5
5
  const injector_1 = require("@nestjs/core/injector/injector");
6
6
  const instance_wrapper_1 = require("@nestjs/core/injector/instance-wrapper");
7
+ /**
8
+ * @publicApi
9
+ */
7
10
  class TestingInjector extends injector_1.Injector {
8
11
  setMocker(mocker) {
9
12
  this.mocker = mocker;
@@ -3,6 +3,9 @@ import { NestApplicationContextOptions } from '@nestjs/common/interfaces/nest-ap
3
3
  import { MetadataScanner } from '@nestjs/core/metadata-scanner';
4
4
  import { MockFactory, OverrideBy } from './interfaces';
5
5
  import { TestingModule } from './testing-module';
6
+ /**
7
+ * @publicApi
8
+ */
6
9
  export declare class TestingModuleBuilder {
7
10
  private readonly metadataScanner;
8
11
  private readonly applicationConfig;
@@ -12,6 +12,9 @@ const testing_logger_service_1 = require("./services/testing-logger.service");
12
12
  const testing_injector_1 = require("./testing-injector");
13
13
  const testing_instance_loader_1 = require("./testing-instance-loader");
14
14
  const testing_module_1 = require("./testing-module");
15
+ /**
16
+ * @publicApi
17
+ */
15
18
  class TestingModuleBuilder {
16
19
  constructor(metadataScanner, metadata) {
17
20
  this.metadataScanner = metadataScanner;
@@ -5,6 +5,9 @@ import { ApplicationConfig } from '@nestjs/core/application-config';
5
5
  import { NestContainer } from '@nestjs/core/injector/container';
6
6
  import { Module } from '@nestjs/core/injector/module';
7
7
  import { GraphInspector } from '@nestjs/core/inspector/graph-inspector';
8
+ /**
9
+ * @publicApi
10
+ */
8
11
  export declare class TestingModule extends NestApplicationContext {
9
12
  private readonly applicationConfig;
10
13
  protected readonly graphInspector: GraphInspector;
package/testing-module.js CHANGED
@@ -5,6 +5,9 @@ const common_1 = require("@nestjs/common");
5
5
  const load_package_util_1 = require("@nestjs/common/utils/load-package.util");
6
6
  const shared_utils_1 = require("@nestjs/common/utils/shared.utils");
7
7
  const core_1 = require("@nestjs/core");
8
+ /**
9
+ * @publicApi
10
+ */
8
11
  class TestingModule extends core_1.NestApplicationContext {
9
12
  constructor(container, graphInspector, contextModule, applicationConfig, scope = []) {
10
13
  const options = {};