@rsdk/testing 3.1.0 → 3.2.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/CHANGELOG.md +12 -0
- package/dist/platform-test.js +3 -1
- package/dist/platform-test.js.map +1 -1
- package/dist/platform-testing-module.js +2 -1
- package/dist/platform-testing-module.js.map +1 -1
- package/package.json +3 -3
- package/src/platform-test.ts +3 -1
- package/src/platform-testing-module.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.2.0-next.1](https://github.com/R-Vision/rsdk/compare/v3.2.0-next.0...v3.2.0-next.1) (2023-08-09)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **testing:** create tests is possible outside of applications ([36455da](https://github.com/R-Vision/rsdk/commit/36455da408927b00e0c02bc37a94d0c0f9cbef20))
|
|
11
|
+
|
|
12
|
+
## [3.2.0-next.0](https://github.com/R-Vision/rsdk/compare/v3.1.0...v3.2.0-next.0) (2023-08-09)
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **http.server:** split to package by implementation @rsdk/http.server.{fastify,express} ([f3cdad1](https://github.com/R-Vision/rsdk/commit/f3cdad1c7372d2bfbaee21d91973d5354cebf46c))
|
|
17
|
+
|
|
6
18
|
## [3.1.0](https://github.com/R-Vision/rsdk/compare/v3.1.0-next.3...v3.1.0) (2023-08-09)
|
|
7
19
|
|
|
8
20
|
**Note:** Version bump only for package @rsdk/testing
|
package/dist/platform-test.js
CHANGED
|
@@ -35,7 +35,9 @@ class PlatformTest {
|
|
|
35
35
|
},
|
|
36
36
|
],
|
|
37
37
|
};
|
|
38
|
-
const context = new core_1.PlatformContext(contextOptions
|
|
38
|
+
const context = new core_1.PlatformContext(contextOptions, {
|
|
39
|
+
skipAssertAppName: true,
|
|
40
|
+
});
|
|
39
41
|
const resultMetadata = {
|
|
40
42
|
imports: [context.getRoot()],
|
|
41
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-test.js","sourceRoot":"","sources":["../src/platform-test.ts"],"names":[],"mappings":";;;AAGA,6CAAuC;AAIvC,qCAA6C;AAE7C,uEAAkE;AAiDlE,MAAa,YAAY;IACc;IAArC,YAAqC,OAA+B;QAA/B,YAAO,GAAP,OAAO,CAAwB;IAAG,CAAC;IAExE;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,OAA+B;QAC3C,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACH,mBAAmB,CAAC,QAAwB;QAC1C,MAAM,cAAc,GAAoB;YACtC,GAAG,IAAI,CAAC,OAAO;YACf,OAAO,EAAE;gBACP;oBACE,GAAG,QAAQ;oBACX,MAAM,EAAE,MAAM,aAAa;qBAAG;iBAC/B;aACF;SACF,CAAC;QACF,MAAM,OAAO,GAAG,IAAI,sBAAe,CAAC,cAAc,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"platform-test.js","sourceRoot":"","sources":["../src/platform-test.ts"],"names":[],"mappings":";;;AAGA,6CAAuC;AAIvC,qCAA6C;AAE7C,uEAAkE;AAiDlE,MAAa,YAAY;IACc;IAArC,YAAqC,OAA+B;QAA/B,YAAO,GAAP,OAAO,CAAwB;IAAG,CAAC;IAExE;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,OAA+B;QAC3C,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACH,mBAAmB,CAAC,QAAwB;QAC1C,MAAM,cAAc,GAAoB;YACtC,GAAG,IAAI,CAAC,OAAO;YACf,OAAO,EAAE;gBACP;oBACE,GAAG,QAAQ;oBACX,MAAM,EAAE,MAAM,aAAa;qBAAG;iBAC/B;aACF;SACF,CAAC;QACF,MAAM,OAAO,GAAG,IAAI,sBAAe,CAAC,cAAc,EAAE;YAClD,iBAAiB,EAAE,IAAI;SACxB,CAAC,CAAC;QACH,MAAM,cAAc,GAAG;YACrB,OAAO,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;SAC7B,CAAC;QACF;;WAEG;QACH,MAAM,aAAa,GAAG,cAAI,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAC;QAE/D;;WAEG;QACH,6DAA6D;QAC7D,MAAM,eAAe,GAAG,aAAa,CAAC,OAAO,CAAC;QAE9C,MAAM,CAAC,cAAc,CAAC,aAAa,EAAE,SAAS,EAAE;YAC9C,KAAK,EAAE,KAAK,WACV,GAAG,IAAiD;gBAEpD,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;gBAElE,OAAO,IAAI,+CAAqB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YACtD,CAAC;SACF,CAAC,CAAC;QACH,6DAA6D;QAC7D,MAAM,CAAC,cAAc,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE;YACnD,KAAK,EAAE,eAAe,CAAC,IAAI;YAC3B,QAAQ,EAAE,KAAK;SAChB,CAAC,CAAC;QACH,OAAO,aAAwD,CAAC;IAClE,CAAC;CACF;AA9DD,oCA8DC"}
|
|
@@ -27,7 +27,8 @@ class PlatformTestingModule {
|
|
|
27
27
|
*/
|
|
28
28
|
async createNestApplication() {
|
|
29
29
|
const context = this.context;
|
|
30
|
-
const
|
|
30
|
+
const createOptions = await context.getNestFactoryCreateOptions();
|
|
31
|
+
const app = this.compiledTestingModule.createNestApplication(...createOptions);
|
|
31
32
|
await context.configureApp(app);
|
|
32
33
|
return app;
|
|
33
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-testing-module.js","sourceRoot":"","sources":["../src/platform-testing-module.ts"],"names":[],"mappings":";;;AAgBA;;;;GAIG;AACH,MAAa,qBAAqB;IAEtB;IACA;IAFV,YACU,qBAAoC,EACpC,OAAwB;QADxB,0BAAqB,GAArB,qBAAqB,CAAe;QACpC,YAAO,GAAP,OAAO,CAAiB;QAEhC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QAC3E,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,IAAI,CACpD,IAAI,CAAC,qBAAqB,CAC3B,CAAC;QACF,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,IAAI,CAChD,IAAI,CAAC,qBAAqB,CAC3B,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,IAAI;QACR,MAAM,IAAI,CAAC,qBAAqB,CAAC,IAAI,EAAE,CAAC;QACxC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,qBAAqB;QAGzB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAE7B,MAAM,GAAG,GAAG,IAAI,CAAC,qBAAqB,CAAC,qBAAqB,CAC1D,GAAG,
|
|
1
|
+
{"version":3,"file":"platform-testing-module.js","sourceRoot":"","sources":["../src/platform-testing-module.ts"],"names":[],"mappings":";;;AAgBA;;;;GAIG;AACH,MAAa,qBAAqB;IAEtB;IACA;IAFV,YACU,qBAAoC,EACpC,OAAwB;QADxB,0BAAqB,GAArB,qBAAqB,CAAe;QACpC,YAAO,GAAP,OAAO,CAAiB;QAEhC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QAC3E,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,IAAI,CACpD,IAAI,CAAC,qBAAqB,CAC3B,CAAC;QACF,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,IAAI,CAChD,IAAI,CAAC,qBAAqB,CAC3B,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,IAAI;QACR,MAAM,IAAI,CAAC,qBAAqB,CAAC,IAAI,EAAE,CAAC;QACxC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,qBAAqB;QAGzB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAE7B,MAAM,aAAa,GAAG,MAAM,OAAO,CAAC,2BAA2B,EAAE,CAAC;QAClE,MAAM,GAAG,GAAG,IAAI,CAAC,qBAAqB,CAAC,qBAAqB,CAC1D,GAAG,aAAa,CACjB,CAAC;QAEF,MAAM,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;QAChC,OAAO,GAAG,CAAC;IACb,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,KAAK;QAGT,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,qBAAqB,EAAK,CAAC;QAElD,MAAM,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,GAAmB,CAAC,CAAC;QACjE,OAAO,GAAG,CAAC;IACb,CAAC;CACF;AA3DD,sDA2DC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdk/testing",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0-next.1",
|
|
4
4
|
"license": "Apache License 2.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"@nestjs/common": "^10.1.3",
|
|
11
11
|
"@nestjs/core": "^10.1.3",
|
|
12
12
|
"@nestjs/testing": "^10.1.3",
|
|
13
|
-
"@rsdk/core": "^3.
|
|
13
|
+
"@rsdk/core": "^3.2.0-next.1"
|
|
14
14
|
},
|
|
15
|
-
"gitHead": "
|
|
15
|
+
"gitHead": "9f5c3bb74ae420f57f0bcb4a2ea1a11db6f21a8f"
|
|
16
16
|
}
|
package/src/platform-test.ts
CHANGED
|
@@ -85,7 +85,9 @@ export class PlatformTest {
|
|
|
85
85
|
},
|
|
86
86
|
],
|
|
87
87
|
};
|
|
88
|
-
const context = new PlatformContext(contextOptions
|
|
88
|
+
const context = new PlatformContext(contextOptions, {
|
|
89
|
+
skipAssertAppName: true,
|
|
90
|
+
});
|
|
89
91
|
const resultMetadata = {
|
|
90
92
|
imports: [context.getRoot()],
|
|
91
93
|
};
|
|
@@ -48,8 +48,9 @@ export class PlatformTestingModule {
|
|
|
48
48
|
>(): Promise<PlatformTestNestApplication<T>> {
|
|
49
49
|
const context = this.context;
|
|
50
50
|
|
|
51
|
+
const createOptions = await context.getNestFactoryCreateOptions();
|
|
51
52
|
const app = this.compiledTestingModule.createNestApplication<T>(
|
|
52
|
-
...
|
|
53
|
+
...createOptions,
|
|
53
54
|
);
|
|
54
55
|
|
|
55
56
|
await context.configureApp(app);
|