@nexus-ioc/testing 0.4.0 → 0.4.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/README.md CHANGED
@@ -1,5 +1,5 @@
1
- ![npm](https://img.shields.io/npm/v/nexus-ioc)
2
- ![license](https://img.shields.io/npm/l/nexus-ioc)
1
+ ![npm](https://img.shields.io/npm/v/@nexus-ioc/testing)
2
+ ![license](https://img.shields.io/npm/l/@nexus-ioc/testing)
3
3
  ![build](https://img.shields.io/github/actions/workflow/status/Isqanderm/ioc/build.yml)
4
4
 
5
5
  Test library for Nexus IoC
@@ -17,14 +17,14 @@ Test library for Nexus IoC
17
17
  ## Installation
18
18
 
19
19
  ```bash
20
- npm install nexus-ioc-testing
20
+ npm install @nexus-ioc/core @nexus-ioc/testing
21
21
  ```
22
22
 
23
23
  ## Quick Start
24
24
 
25
25
  ```typescript
26
- import { Injectable } from 'nexus-ioc';
27
- import { Test } from 'nexus-ioc-testing';
26
+ import { Injectable } from '@nexus-ioc/core';
27
+ import { Test } from '@nexus-ioc/testing';
28
28
 
29
29
  describe('AppModule', () => {
30
30
  it('should create instance', async () => {
@@ -1,4 +1,4 @@
1
- import type { HashUtilInterface } from "nexus-ioc/dist/interfaces";
1
+ import type { HashUtilInterface } from "@nexus-ioc/core/dist/interfaces";
2
2
  export declare class HashTestingUtil implements HashUtilInterface {
3
3
  hashString(value: string): Promise<string>;
4
4
  hashObject(value: object): Promise<string>;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HashTestingUtil = void 0;
4
- const random_string_generator_util_1 = require("nexus-ioc/dist/utils/random-string-generator.util");
4
+ const random_string_generator_util_1 = require("@nexus-ioc/core/dist/utils/random-string-generator.util");
5
5
  class HashTestingUtil {
6
6
  async hashString(value) {
7
7
  let index = 0;
@@ -1 +1 @@
1
- {"version":3,"file":"hash-testing-util.js","sourceRoot":"","sources":["../../src/core/hash-testing-util.ts"],"names":[],"mappings":";;;AACA,oGAA0F;AAE1F,MAAa,eAAe;IAC3B,KAAK,CAAC,UAAU,CAAC,KAAa;QAC7B,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,OAAO,IAAI,KAAK,CAAC,EAAE,CAAC;aAClB,IAAI,CAAC,IAAI,CAAC;aACV,GAAG,CAAC,GAAG,EAAE;YACT,KAAK,EAAE,CAAC;YAER,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;gBAC3B,KAAK,GAAG,CAAC,CAAC;YACX,CAAC;YAED,OAAO,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC,CAAC;aACD,IAAI,CAAC,EAAE,CAAC,CAAC;IACZ,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,KAAa;QAC7B,OAAO,EAAE,CAAC;IACX,CAAC;IAED,qBAAqB;QACpB,OAAO,IAAA,oDAAqB,GAAE,CAAC;IAChC,CAAC;CACD;AAxBD,0CAwBC"}
1
+ {"version":3,"file":"hash-testing-util.js","sourceRoot":"","sources":["../../src/core/hash-testing-util.ts"],"names":[],"mappings":";;;AACA,0GAAgG;AAEhG,MAAa,eAAe;IAC3B,KAAK,CAAC,UAAU,CAAC,KAAa;QAC7B,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,OAAO,IAAI,KAAK,CAAC,EAAE,CAAC;aAClB,IAAI,CAAC,IAAI,CAAC;aACV,GAAG,CAAC,GAAG,EAAE;YACT,KAAK,EAAE,CAAC;YAER,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;gBAC3B,KAAK,GAAG,CAAC,CAAC;YACX,CAAC;YAED,OAAO,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC,CAAC;aACD,IAAI,CAAC,EAAE,CAAC,CAAC;IACZ,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,KAAa;QAC7B,OAAO,EAAE,CAAC;IACX,CAAC;IAED,qBAAqB;QACpB,OAAO,IAAA,oDAAqB,GAAE,CAAC;IAChC,CAAC;CACD;AAxBD,0CAwBC"}
@@ -1,4 +1,4 @@
1
- import { type DynamicModule, type GraphError, type InjectionToken, type Module, type ModuleContainerInterface, type ModuleMetadata, type ScannerPluginInterface } from "nexus-ioc";
1
+ import { type DynamicModule, type GraphError, type InjectionToken, type Module, type ModuleContainerInterface, type ModuleMetadata, type ScannerPluginInterface } from "@nexus-ioc/core";
2
2
  import type { ModuleTestingContainerInterface } from "../interfaces";
3
3
  export declare class Test<T extends ModuleMetadata = ModuleMetadata> implements ModuleTestingContainerInterface<T> {
4
4
  private readonly metatype;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Test = void 0;
4
- const nexus_ioc_1 = require("nexus-ioc");
5
- const container_1 = require("nexus-ioc/dist/core/modules/container");
6
- const container_not_compiled_error_1 = require("nexus-ioc/dist/errors/container-not-compiled.error");
4
+ const core_1 = require("@nexus-ioc/core");
5
+ const container_1 = require("@nexus-ioc/core/dist/core/modules/container");
6
+ const container_not_compiled_error_1 = require("@nexus-ioc/core/dist/errors/container-not-compiled.error");
7
7
  const hash_testing_util_1 = require("./hash-testing-util");
8
8
  const testing_creator_1 = require("./testing-creator");
9
9
  class Test {
@@ -14,7 +14,7 @@ class Test {
14
14
  this.container = new container_1.Container(this.hashTestingUtil);
15
15
  this.moduleTestingCreator = new testing_creator_1.TestingCreator();
16
16
  this._moduleContainer = null;
17
- this._moduleDecorator = nexus_ioc_1.NsModule;
17
+ this._moduleDecorator = core_1.NsModule;
18
18
  this._module = null;
19
19
  this.containerCompiled = false;
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"testing-container.js","sourceRoot":"","sources":["../../src/core/testing-container.ts"],"names":[],"mappings":";;;AAAA,yCASmB;AACnB,qEAAkE;AAClE,qGAA+F;AAE/F,2DAAsD;AACtD,uDAAmD;AAEnD,MAAa,IAAI;IA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IAAI,CAAC,GAAG,OAAO,CAAC,CAAC;QACrC,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,kBAAkB,CAAC,SAA0C;QACnE,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;QAClC,OAAO,IAAI,CAAC;IACb,CAAC;IAED,IAAW,MAAM;QAChB,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC7B,MAAM,IAAI,wDAAyB,EAAE,CAAC;QACvC,CAAC;QAED,OAAO,IAAI,CAAC,gBAAgB,EAAE,MAAsB,CAAC;IACtD,CAAC;CACD;AAtGD,oBAsGC"}
@@ -1,4 +1,4 @@
1
- import type { ModuleMetadata, Type } from "nexus-ioc";
1
+ import type { ModuleMetadata, Type } from "@nexus-ioc/core";
2
2
  export declare class TestingCreator<T extends ModuleMetadata> {
3
3
  create(metatype: T, moduleDecorator: (metadata: T) => ClassDecorator): Type<unknown>;
4
4
  }
@@ -1,4 +1,4 @@
1
- import type { ContainerBaseInterface, ModuleContainerInterface, ModuleMetadata, ModulePluginInterface } from "nexus-ioc";
1
+ import type { ContainerBaseInterface, ModuleContainerInterface, ModuleMetadata, ModulePluginInterface } from "@nexus-ioc/core";
2
2
  export interface ModuleTestingContainerInterface<T extends ModuleMetadata> extends ContainerBaseInterface, ModulePluginInterface {
3
3
  setModuleDecorator(decorator: <M extends ModuleMetadata = ModuleMetadata>(metadata: M) => ClassDecorator): this;
4
4
  compile(): Promise<ModuleContainerInterface>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexus-ioc/testing",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Testing helpers for Nexus IoC library",
5
5
  "author": "IsqanderM <aleksandr.melnik.personal@gmail.com>",
6
6
  "homepage": "https://github.com/Isqanderm/ioc#readme",