@nexus-ioc/testing 0.4.0
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/LICENSE +21 -0
- package/README.md +62 -0
- package/dist/core/hash-testing-util.d.ts +6 -0
- package/dist/core/hash-testing-util.js +27 -0
- package/dist/core/hash-testing-util.js.map +1 -0
- package/dist/core/testing-container.d.ts +25 -0
- package/dist/core/testing-container.js +78 -0
- package/dist/core/testing-container.js.map +1 -0
- package/dist/core/testing-creator.d.ts +4 -0
- package/dist/core/testing-creator.js +13 -0
- package/dist/core/testing-creator.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.js +5 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/interfaces/module-testing-container.interface.d.ts +5 -0
- package/dist/interfaces/module-testing-container.interface.js +3 -0
- package/dist/interfaces/module-testing-container.interface.js.map +1 -0
- package/package.json +57 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Aleksandr Melnik
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+

|
|
2
|
+

|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
Test library for Nexus IoC
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
|
|
9
|
+
- [Installation](#installation)
|
|
10
|
+
- [Quick Start](#quick-start)
|
|
11
|
+
- [License](#license)
|
|
12
|
+
- [Author](#author)
|
|
13
|
+
- [Contributing](#contributing)
|
|
14
|
+
- [Acknowledgements](#acknowledgements)
|
|
15
|
+
- [Wiki](#wiki)
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install nexus-ioc-testing
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Quick Start
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { Injectable } from 'nexus-ioc';
|
|
27
|
+
import { Test } from 'nexus-ioc-testing';
|
|
28
|
+
|
|
29
|
+
describe('AppModule', () => {
|
|
30
|
+
it('should create instance', async () => {
|
|
31
|
+
@Injectable()
|
|
32
|
+
class AppService {}
|
|
33
|
+
|
|
34
|
+
const appModule = await Test.createModule({
|
|
35
|
+
providers: [AppService],
|
|
36
|
+
}).compile();
|
|
37
|
+
|
|
38
|
+
const appService = await appModule.get<AppService>(AppService);
|
|
39
|
+
expect(appService).toBeInstanceOf(AppService);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## License
|
|
45
|
+
|
|
46
|
+
This project is licensed under the MIT License. See the LICENSE file for details.
|
|
47
|
+
|
|
48
|
+
## Author
|
|
49
|
+
|
|
50
|
+
Isqanderm (Aleksandr Melnik) - [LinkedIn](www.linkedin.com/in/isqander-melnik)
|
|
51
|
+
|
|
52
|
+
## Contributing
|
|
53
|
+
|
|
54
|
+
Contributions are welcome! Please open an issue or submit a pull request.
|
|
55
|
+
|
|
56
|
+
## Acknowledgements
|
|
57
|
+
|
|
58
|
+
Special thanks to the developers of Angular and NestJS for the inspiration.
|
|
59
|
+
|
|
60
|
+
## Wiki
|
|
61
|
+
|
|
62
|
+
For more detailed documentation, please visit the [Wiki](https://github.com/Isqanderm/ioc/wiki/Testing).
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HashTestingUtil = void 0;
|
|
4
|
+
const random_string_generator_util_1 = require("nexus-ioc/dist/utils/random-string-generator.util");
|
|
5
|
+
class HashTestingUtil {
|
|
6
|
+
async hashString(value) {
|
|
7
|
+
let index = 0;
|
|
8
|
+
return new Array(64)
|
|
9
|
+
.fill(null)
|
|
10
|
+
.map(() => {
|
|
11
|
+
index++;
|
|
12
|
+
if (index >= value.length) {
|
|
13
|
+
index = 0;
|
|
14
|
+
}
|
|
15
|
+
return value.charAt(index);
|
|
16
|
+
})
|
|
17
|
+
.join("");
|
|
18
|
+
}
|
|
19
|
+
async hashObject(value) {
|
|
20
|
+
return "";
|
|
21
|
+
}
|
|
22
|
+
randomStringGenerator() {
|
|
23
|
+
return (0, random_string_generator_util_1.randomStringGenerator)();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.HashTestingUtil = HashTestingUtil;
|
|
27
|
+
//# sourceMappingURL=hash-testing-util.js.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type DynamicModule, type GraphError, type InjectionToken, type Module, type ModuleContainerInterface, type ModuleMetadata, type ScannerPluginInterface } from "nexus-ioc";
|
|
2
|
+
import type { ModuleTestingContainerInterface } from "../interfaces";
|
|
3
|
+
export declare class Test<T extends ModuleMetadata = ModuleMetadata> implements ModuleTestingContainerInterface<T> {
|
|
4
|
+
private readonly metatype;
|
|
5
|
+
private readonly scannerPlugins;
|
|
6
|
+
private readonly hashTestingUtil;
|
|
7
|
+
private readonly container;
|
|
8
|
+
private readonly moduleTestingCreator;
|
|
9
|
+
private _moduleContainer;
|
|
10
|
+
private _moduleDecorator;
|
|
11
|
+
private _module;
|
|
12
|
+
private containerCompiled;
|
|
13
|
+
private constructor();
|
|
14
|
+
static createModule<M extends ModuleMetadata = ModuleMetadata>(metatype: M): Test<M>;
|
|
15
|
+
addModule(metatype: Module | DynamicModule): Promise<ModuleContainerInterface>;
|
|
16
|
+
getModule(metatype: Module): Promise<ModuleContainerInterface | undefined>;
|
|
17
|
+
replaceModule(metatypeToReplace: Module, newMetatype: Module): Promise<ModuleContainerInterface>;
|
|
18
|
+
get<T>(token: InjectionToken): Promise<T | undefined>;
|
|
19
|
+
compile(): Promise<ModuleContainerInterface>;
|
|
20
|
+
get module(): Module | null;
|
|
21
|
+
get moduleContainer(): ModuleContainerInterface | null;
|
|
22
|
+
addScannerPlugin(scanner: ScannerPluginInterface | ScannerPluginInterface[]): this;
|
|
23
|
+
setModuleDecorator(decorator: (metadata: T) => ClassDecorator): this;
|
|
24
|
+
get errors(): GraphError[];
|
|
25
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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");
|
|
7
|
+
const hash_testing_util_1 = require("./hash-testing-util");
|
|
8
|
+
const testing_creator_1 = require("./testing-creator");
|
|
9
|
+
class Test {
|
|
10
|
+
constructor(metatype) {
|
|
11
|
+
this.metatype = metatype;
|
|
12
|
+
this.scannerPlugins = [];
|
|
13
|
+
this.hashTestingUtil = new hash_testing_util_1.HashTestingUtil();
|
|
14
|
+
this.container = new container_1.Container(this.hashTestingUtil);
|
|
15
|
+
this.moduleTestingCreator = new testing_creator_1.TestingCreator();
|
|
16
|
+
this._moduleContainer = null;
|
|
17
|
+
this._moduleDecorator = nexus_ioc_1.NsModule;
|
|
18
|
+
this._module = null;
|
|
19
|
+
this.containerCompiled = false;
|
|
20
|
+
}
|
|
21
|
+
static createModule(metatype) {
|
|
22
|
+
return new Test(metatype);
|
|
23
|
+
}
|
|
24
|
+
async addModule(metatype) {
|
|
25
|
+
return this.container.addModule(metatype);
|
|
26
|
+
}
|
|
27
|
+
async getModule(metatype) {
|
|
28
|
+
return this.container.getModule(metatype);
|
|
29
|
+
}
|
|
30
|
+
async replaceModule(metatypeToReplace, newMetatype) {
|
|
31
|
+
return this.container.replaceModule(metatypeToReplace, newMetatype);
|
|
32
|
+
}
|
|
33
|
+
get(token) {
|
|
34
|
+
if (!this.containerCompiled) {
|
|
35
|
+
throw new container_not_compiled_error_1.ContainerNotCompiledError();
|
|
36
|
+
}
|
|
37
|
+
return this.container.get(token);
|
|
38
|
+
}
|
|
39
|
+
async compile() {
|
|
40
|
+
this._module = this.moduleTestingCreator.create(this.metatype, this._moduleDecorator);
|
|
41
|
+
this._moduleContainer = await this.container.addModule(this._module);
|
|
42
|
+
await this.container.run(this._moduleContainer.metatype);
|
|
43
|
+
this.containerCompiled = true;
|
|
44
|
+
for (const scannerPlugin of this.scannerPlugins) {
|
|
45
|
+
await scannerPlugin.scan(this.container.graph);
|
|
46
|
+
}
|
|
47
|
+
return this._moduleContainer;
|
|
48
|
+
}
|
|
49
|
+
get module() {
|
|
50
|
+
if (!this.containerCompiled) {
|
|
51
|
+
throw new container_not_compiled_error_1.ContainerNotCompiledError();
|
|
52
|
+
}
|
|
53
|
+
return this._module;
|
|
54
|
+
}
|
|
55
|
+
get moduleContainer() {
|
|
56
|
+
if (!this.containerCompiled) {
|
|
57
|
+
throw new container_not_compiled_error_1.ContainerNotCompiledError();
|
|
58
|
+
}
|
|
59
|
+
return this._moduleContainer;
|
|
60
|
+
}
|
|
61
|
+
addScannerPlugin(scanner) {
|
|
62
|
+
const plugins = Array.isArray(scanner) ? scanner : [scanner];
|
|
63
|
+
this.scannerPlugins.push(...plugins);
|
|
64
|
+
return this;
|
|
65
|
+
}
|
|
66
|
+
setModuleDecorator(decorator) {
|
|
67
|
+
this._moduleDecorator = decorator;
|
|
68
|
+
return this;
|
|
69
|
+
}
|
|
70
|
+
get errors() {
|
|
71
|
+
if (!this.containerCompiled) {
|
|
72
|
+
throw new container_not_compiled_error_1.ContainerNotCompiledError();
|
|
73
|
+
}
|
|
74
|
+
return this._moduleContainer?.errors;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.Test = Test;
|
|
78
|
+
//# sourceMappingURL=testing-container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing-container.js","sourceRoot":"","sources":["../../src/core/testing-container.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TestingCreator = void 0;
|
|
4
|
+
class TestingCreator {
|
|
5
|
+
create(metatype, moduleDecorator) {
|
|
6
|
+
const module = class {
|
|
7
|
+
};
|
|
8
|
+
moduleDecorator(metatype)(module);
|
|
9
|
+
return module;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.TestingCreator = TestingCreator;
|
|
13
|
+
//# sourceMappingURL=testing-creator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing-creator.js","sourceRoot":"","sources":["../../src/core/testing-creator.ts"],"names":[],"mappings":";;;AAEA,MAAa,cAAc;IAC1B,MAAM,CACL,QAAW,EACX,eAAgD;QAEhD,MAAM,MAAM,GAAG;SAAQ,CAAC;QAExB,eAAe,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;QAElC,OAAO,MAAM,CAAC;IACf,CAAC;CACD;AAXD,wCAWC"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Test = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
var testing_container_1 = require("./core/testing-container");
|
|
6
|
+
Object.defineProperty(exports, "Test", { enumerable: true, get: function () { return testing_container_1.Test; } });
|
|
7
|
+
tslib_1.__exportStar(require("./interfaces"), exports);
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,8DAAgD;AAAvC,yGAAA,IAAI,OAAA;AACb,uDAA6B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./module-testing-container.interface";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;AAAA,+EAAqD"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ContainerBaseInterface, ModuleContainerInterface, ModuleMetadata, ModulePluginInterface } from "nexus-ioc";
|
|
2
|
+
export interface ModuleTestingContainerInterface<T extends ModuleMetadata> extends ContainerBaseInterface, ModulePluginInterface {
|
|
3
|
+
setModuleDecorator(decorator: <M extends ModuleMetadata = ModuleMetadata>(metadata: M) => ClassDecorator): this;
|
|
4
|
+
compile(): Promise<ModuleContainerInterface>;
|
|
5
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-testing-container.interface.js","sourceRoot":"","sources":["../../src/interfaces/module-testing-container.interface.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nexus-ioc/testing",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Testing helpers for Nexus IoC library",
|
|
5
|
+
"author": "IsqanderM <aleksandr.melnik.personal@gmail.com>",
|
|
6
|
+
"homepage": "https://github.com/Isqanderm/ioc#readme",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/Isqanderm/ioc.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/Isqanderm/ioc/issues"
|
|
13
|
+
},
|
|
14
|
+
"directories": {
|
|
15
|
+
"lib": "src",
|
|
16
|
+
"test": "__test__"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"package.json",
|
|
21
|
+
"LICENSE",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
24
|
+
"main": "./dist/index.js",
|
|
25
|
+
"module": "./dist/index.js",
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"reflect-metadata": "^0.1.12 || ^0.2.0",
|
|
30
|
+
"@nexus-ioc/core": "^0.4.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/jest": "^29.5.12",
|
|
34
|
+
"@types/node": "^22.5.4",
|
|
35
|
+
"jest": "^29.7.0",
|
|
36
|
+
"reflect-metadata": "^0.1.12 || ^0.2.0",
|
|
37
|
+
"sinon": "^18.0.0",
|
|
38
|
+
"ts-jest": "^29.1.4",
|
|
39
|
+
"ts-node": "^10.9.2",
|
|
40
|
+
"typescript": "^5.5.3"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"tslib": "^2.7.0"
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "tsc",
|
|
47
|
+
"test": "echo 0",
|
|
48
|
+
"clean": "rm -rf ./dist && rm tsconfig.tsbuildinfo",
|
|
49
|
+
"test:watch": "jest --watch",
|
|
50
|
+
"code:format": "npx @biomejs/biome format --write",
|
|
51
|
+
"code:lint": "npx @biomejs/biome lint --write",
|
|
52
|
+
"code:check": "npx @biomejs/biome check",
|
|
53
|
+
"code:check:ci": "npx @biomejs/biome ci",
|
|
54
|
+
"code:check:apply": "npx @biomejs/biome check --write",
|
|
55
|
+
"test:ready": "echo 0"
|
|
56
|
+
}
|
|
57
|
+
}
|