@tsed/platform-test-sdk 7.83.3 → 8.0.0-alpha.10
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/lib/esm/components/PlatformTestSdk.js +1 -1
- package/lib/esm/components/PlatformTestSdk.js.map +1 -1
- package/lib/esm/modules/feature/FeatureModule.js.map +1 -1
- package/lib/esm/modules/feature/controllers/FeatureController.js +2 -1
- package/lib/esm/modules/feature/controllers/FeatureController.js.map +1 -1
- package/lib/esm/tests/exports.js +1 -1
- package/lib/esm/tests/exports.js.map +1 -1
- package/lib/esm/tests/testAcceptMime.js +3 -2
- package/lib/esm/tests/testAcceptMime.js.map +1 -1
- package/lib/esm/tests/testAuth.js +3 -2
- package/lib/esm/tests/testAuth.js.map +1 -1
- package/lib/esm/tests/testBodyParams.js +2 -1
- package/lib/esm/tests/testBodyParams.js.map +1 -1
- package/lib/esm/tests/testCache.js +4 -3
- package/lib/esm/tests/testCache.js.map +1 -1
- package/lib/esm/tests/testChildrenControllers.js +3 -1
- package/lib/esm/tests/testChildrenControllers.js.map +1 -1
- package/lib/esm/tests/testCookies.js +3 -1
- package/lib/esm/tests/testCookies.js.map +1 -1
- package/lib/esm/tests/testCustom404.js +1 -0
- package/lib/esm/tests/testCustom404.js.map +1 -1
- package/lib/esm/tests/testDeepQueryParams.js +3 -2
- package/lib/esm/tests/testDeepQueryParams.js.map +1 -1
- package/lib/esm/tests/testErrors.js +9 -8
- package/lib/esm/tests/testErrors.js.map +1 -1
- package/lib/esm/tests/testHandlers.js +3 -2
- package/lib/esm/tests/testHandlers.js.map +1 -1
- package/lib/esm/tests/testHeaderParams.js +3 -2
- package/lib/esm/tests/testHeaderParams.js.map +1 -1
- package/lib/esm/tests/testHeaders.js +7 -6
- package/lib/esm/tests/testHeaders.js.map +1 -1
- package/lib/esm/tests/testInheritanceController.js +4 -3
- package/lib/esm/tests/testInheritanceController.js.map +1 -1
- package/lib/esm/tests/testLocals.js +3 -1
- package/lib/esm/tests/testLocals.js.map +1 -1
- package/lib/esm/tests/testLocation.js +3 -2
- package/lib/esm/tests/testLocation.js.map +1 -1
- package/lib/esm/tests/testMiddlewares.js +3 -1
- package/lib/esm/tests/testMiddlewares.js.map +1 -1
- package/lib/esm/tests/testModule.js +3 -1
- package/lib/esm/tests/testModule.js.map +1 -1
- package/lib/esm/tests/testMulter.js +1 -0
- package/lib/esm/tests/testMulter.js.map +1 -1
- package/lib/esm/tests/testPathParams.js +3 -2
- package/lib/esm/tests/testPathParams.js.map +1 -1
- package/lib/esm/tests/testQueryParams.js +3 -2
- package/lib/esm/tests/testQueryParams.js.map +1 -1
- package/lib/esm/tests/testRedirect.js +4 -2
- package/lib/esm/tests/testRedirect.js.map +1 -1
- package/lib/esm/tests/testResponse.js +5 -4
- package/lib/esm/tests/testResponse.js.map +1 -1
- package/lib/esm/tests/testResponseFilter.js +5 -4
- package/lib/esm/tests/testResponseFilter.js.map +1 -1
- package/lib/esm/tests/testRouting.js +3 -1
- package/lib/esm/tests/testRouting.js.map +1 -1
- package/lib/esm/tests/testScopeRequest.js +3 -1
- package/lib/esm/tests/testScopeRequest.js.map +1 -1
- package/lib/esm/tests/testSession.js +3 -2
- package/lib/esm/tests/testSession.js.map +1 -1
- package/lib/esm/tests/testStatics.js +1 -0
- package/lib/esm/tests/testStatics.js.map +1 -1
- package/lib/esm/tests/testStream.js +3 -2
- package/lib/esm/tests/testStream.js.map +1 -1
- package/lib/esm/tests/testView.js +4 -2
- package/lib/esm/tests/testView.js.map +1 -1
- package/lib/types/components/PlatformTestSdk.d.ts +1 -1
- package/package.json +26 -24
- package/lib/cjs/components/PlatformTestSdk.js +0 -30
- package/lib/cjs/components/PlatformTestSdk.js.map +0 -1
- package/lib/cjs/data/response.data.json +0 -3
- package/lib/cjs/data/swagger.json +0 -32
- package/lib/cjs/errors/CustomBadRequest.js +0 -17
- package/lib/cjs/errors/CustomBadRequest.js.map +0 -1
- package/lib/cjs/errors/CustomInternalError.js +0 -17
- package/lib/cjs/errors/CustomInternalError.js.map +0 -1
- package/lib/cjs/index.js +0 -44
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/interfaces/PlatformTestingSdkOpts.js +0 -3
- package/lib/cjs/interfaces/PlatformTestingSdkOpts.js.map +0 -1
- package/lib/cjs/interfaces/index.js +0 -8
- package/lib/cjs/interfaces/index.js.map +0 -1
- package/lib/cjs/modules/feature/FeatureModule.js +0 -17
- package/lib/cjs/modules/feature/FeatureModule.js.map +0 -1
- package/lib/cjs/modules/feature/controllers/FeatureController.js +0 -23
- package/lib/cjs/modules/feature/controllers/FeatureController.js.map +0 -1
- package/lib/cjs/package.json +0 -3
- package/lib/cjs/tests/exports.js +0 -68
- package/lib/cjs/tests/exports.js.map +0 -1
- package/lib/cjs/tests/testAcceptMime.js +0 -103
- package/lib/cjs/tests/testAcceptMime.js.map +0 -1
- package/lib/cjs/tests/testAuth.js +0 -343
- package/lib/cjs/tests/testAuth.js.map +0 -1
- package/lib/cjs/tests/testBodyParams.js +0 -539
- package/lib/cjs/tests/testBodyParams.js.map +0 -1
- package/lib/cjs/tests/testCache.js +0 -299
- package/lib/cjs/tests/testCache.js.map +0 -1
- package/lib/cjs/tests/testChildrenControllers.js +0 -64
- package/lib/cjs/tests/testChildrenControllers.js.map +0 -1
- package/lib/cjs/tests/testCookies.js +0 -45
- package/lib/cjs/tests/testCookies.js.map +0 -1
- package/lib/cjs/tests/testCustom404.js +0 -32
- package/lib/cjs/tests/testCustom404.js.map +0 -1
- package/lib/cjs/tests/testDeepQueryParams.js +0 -139
- package/lib/cjs/tests/testDeepQueryParams.js.map +0 -1
- package/lib/cjs/tests/testErrors.js +0 -253
- package/lib/cjs/tests/testErrors.js.map +0 -1
- package/lib/cjs/tests/testHandlers.js +0 -106
- package/lib/cjs/tests/testHandlers.js.map +0 -1
- package/lib/cjs/tests/testHeaderParams.js +0 -169
- package/lib/cjs/tests/testHeaderParams.js.map +0 -1
- package/lib/cjs/tests/testHeaders.js +0 -85
- package/lib/cjs/tests/testHeaders.js.map +0 -1
- package/lib/cjs/tests/testInheritanceController.js +0 -239
- package/lib/cjs/tests/testInheritanceController.js.map +0 -1
- package/lib/cjs/tests/testLocals.js +0 -63
- package/lib/cjs/tests/testLocals.js.map +0 -1
- package/lib/cjs/tests/testLocation.js +0 -42
- package/lib/cjs/tests/testLocation.js.map +0 -1
- package/lib/cjs/tests/testMiddlewares.js +0 -210
- package/lib/cjs/tests/testMiddlewares.js.map +0 -1
- package/lib/cjs/tests/testModule.js +0 -49
- package/lib/cjs/tests/testModule.js.map +0 -1
- package/lib/cjs/tests/testMulter.js +0 -169
- package/lib/cjs/tests/testMulter.js.map +0 -1
- package/lib/cjs/tests/testPathParams.js +0 -143
- package/lib/cjs/tests/testPathParams.js.map +0 -1
- package/lib/cjs/tests/testQueryParams.js +0 -241
- package/lib/cjs/tests/testQueryParams.js.map +0 -1
- package/lib/cjs/tests/testRedirect.js +0 -143
- package/lib/cjs/tests/testRedirect.js.map +0 -1
- package/lib/cjs/tests/testResponse.js +0 -569
- package/lib/cjs/tests/testResponse.js.map +0 -1
- package/lib/cjs/tests/testResponseFilter.js +0 -106
- package/lib/cjs/tests/testResponseFilter.js.map +0 -1
- package/lib/cjs/tests/testRouting.js +0 -77
- package/lib/cjs/tests/testRouting.js.map +0 -1
- package/lib/cjs/tests/testScopeRequest.js +0 -113
- package/lib/cjs/tests/testScopeRequest.js.map +0 -1
- package/lib/cjs/tests/testSession.js +0 -122
- package/lib/cjs/tests/testSession.js.map +0 -1
- package/lib/cjs/tests/testStatics.js +0 -58
- package/lib/cjs/tests/testStatics.js.map +0 -1
- package/lib/cjs/tests/testStream.js +0 -65
- package/lib/cjs/tests/testStream.js.map +0 -1
- package/lib/cjs/tests/testView.js +0 -83
- package/lib/cjs/tests/testView.js.map +0 -1
- package/lib/esm/package.json +0 -3
- package/lib/types-esm/components/PlatformTestSdk.d.ts +0 -9
- package/lib/types-esm/errors/CustomBadRequest.d.ts +0 -8
- package/lib/types-esm/errors/CustomInternalError.d.ts +0 -8
- package/lib/types-esm/index.d.ts +0 -40
- package/lib/types-esm/interfaces/PlatformTestingSdkOpts.d.ts +0 -8
- package/lib/types-esm/interfaces/index.d.ts +0 -4
- package/lib/types-esm/modules/feature/FeatureModule.d.ts +0 -2
- package/lib/types-esm/modules/feature/controllers/FeatureController.d.ts +0 -3
- package/lib/types-esm/tests/exports.d.ts +0 -2
- package/lib/types-esm/tests/testAcceptMime.d.ts +0 -2
- package/lib/types-esm/tests/testAuth.d.ts +0 -8
- package/lib/types-esm/tests/testBodyParams.d.ts +0 -3
- package/lib/types-esm/tests/testCache.d.ts +0 -2
- package/lib/types-esm/tests/testChildrenControllers.d.ts +0 -2
- package/lib/types-esm/tests/testCookies.d.ts +0 -11
- package/lib/types-esm/tests/testCustom404.d.ts +0 -2
- package/lib/types-esm/tests/testDeepQueryParams.d.ts +0 -3
- package/lib/types-esm/tests/testErrors.d.ts +0 -19
- package/lib/types-esm/tests/testHandlers.d.ts +0 -12
- package/lib/types-esm/tests/testHeaderParams.d.ts +0 -16
- package/lib/types-esm/tests/testHeaders.d.ts +0 -8
- package/lib/types-esm/tests/testInheritanceController.d.ts +0 -42
- package/lib/types-esm/tests/testLocals.d.ts +0 -2
- package/lib/types-esm/tests/testLocation.d.ts +0 -2
- package/lib/types-esm/tests/testMiddlewares.d.ts +0 -8
- package/lib/types-esm/tests/testModule.d.ts +0 -2
- package/lib/types-esm/tests/testMulter.d.ts +0 -21
- package/lib/types-esm/tests/testPathParams.d.ts +0 -2
- package/lib/types-esm/tests/testQueryParams.d.ts +0 -6
- package/lib/types-esm/tests/testRedirect.d.ts +0 -2
- package/lib/types-esm/tests/testResponse.d.ts +0 -16
- package/lib/types-esm/tests/testResponseFilter.d.ts +0 -2
- package/lib/types-esm/tests/testRouting.d.ts +0 -7
- package/lib/types-esm/tests/testScopeRequest.d.ts +0 -12
- package/lib/types-esm/tests/testSession.d.ts +0 -16
- package/lib/types-esm/tests/testStatics.d.ts +0 -2
- package/lib/types-esm/tests/testStream.d.ts +0 -2
- package/lib/types-esm/tests/testView.d.ts +0 -2
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.testView = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const common_1 = require("@tsed/common");
|
|
6
|
-
const os_1 = require("os");
|
|
7
|
-
const supertest_1 = tslib_1.__importDefault(require("supertest"));
|
|
8
|
-
const platform_views_1 = require("@tsed/platform-views");
|
|
9
|
-
let LocalsMiddleware = class LocalsMiddleware {
|
|
10
|
-
use(locals) {
|
|
11
|
-
locals.localID = "local-10909";
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
tslib_1.__decorate([
|
|
15
|
-
tslib_1.__param(0, (0, common_1.Locals)()),
|
|
16
|
-
tslib_1.__metadata("design:type", Function),
|
|
17
|
-
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
18
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
19
|
-
], LocalsMiddleware.prototype, "use", null);
|
|
20
|
-
LocalsMiddleware = tslib_1.__decorate([
|
|
21
|
-
(0, common_1.Middleware)()
|
|
22
|
-
], LocalsMiddleware);
|
|
23
|
-
let ViewCtrl = class ViewCtrl {
|
|
24
|
-
testScenario1() {
|
|
25
|
-
return {
|
|
26
|
-
world: "world"
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
testScenario2() {
|
|
30
|
-
return {
|
|
31
|
-
world: "world"
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
tslib_1.__decorate([
|
|
36
|
-
(0, common_1.Get)("/scenario-1"),
|
|
37
|
-
(0, common_1.UseBefore)(LocalsMiddleware),
|
|
38
|
-
(0, platform_views_1.View)("view.ejs", { opts: "opts" }),
|
|
39
|
-
tslib_1.__metadata("design:type", Function),
|
|
40
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
41
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
42
|
-
], ViewCtrl.prototype, "testScenario1", null);
|
|
43
|
-
tslib_1.__decorate([
|
|
44
|
-
(0, common_1.Get)("/scenario-2"),
|
|
45
|
-
(0, platform_views_1.View)("view", { opts: "opts" }) // missing extension
|
|
46
|
-
,
|
|
47
|
-
tslib_1.__metadata("design:type", Function),
|
|
48
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
49
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
50
|
-
], ViewCtrl.prototype, "testScenario2", null);
|
|
51
|
-
ViewCtrl = tslib_1.__decorate([
|
|
52
|
-
(0, common_1.Controller)("/views")
|
|
53
|
-
], ViewCtrl);
|
|
54
|
-
function testView(options) {
|
|
55
|
-
let request;
|
|
56
|
-
beforeAll(common_1.PlatformTest.bootstrap(options.server, {
|
|
57
|
-
...options,
|
|
58
|
-
mount: {
|
|
59
|
-
"/rest": [ViewCtrl]
|
|
60
|
-
}
|
|
61
|
-
}));
|
|
62
|
-
beforeAll(() => {
|
|
63
|
-
request = (0, supertest_1.default)(common_1.PlatformTest.callback());
|
|
64
|
-
});
|
|
65
|
-
afterAll(common_1.PlatformTest.reset);
|
|
66
|
-
describe("Scenario1: GET /rest/views/scenario-1", () => {
|
|
67
|
-
it("should render a view", async () => {
|
|
68
|
-
const response = await request.get("/rest/views/scenario-1").expect(200);
|
|
69
|
-
expect(response.headers["content-type"]).toEqual("text/html; charset=utf-8");
|
|
70
|
-
expect(response.text).toEqual(`<p>Hello world with opts and ID local-10909</p>${os_1.EOL}`);
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
describe("Scenario2: GET /rest/views/scenario-2", () => {
|
|
74
|
-
it("should throw an error when extension is not defined", async () => {
|
|
75
|
-
const response = await request.get("/rest/views/scenario-2").expect(500);
|
|
76
|
-
expect(response.body.name).toEqual("TEMPLATE_RENDER_ERROR");
|
|
77
|
-
expect(response.body.message).toContain("Template rendering error: ViewCtrl.testScenario2()");
|
|
78
|
-
expect(response.body.status).toEqual(500);
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
exports.testView = testView;
|
|
83
|
-
//# sourceMappingURL=testView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testView.js","sourceRoot":"","sources":["../../../src/tests/testView.ts"],"names":[],"mappings":";;;;AAAA,yCAA0F;AAC1F,2BAAuB;AACvB,kEAAkC;AAClC,yDAA0C;AAI1C,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IACpB,GAAG,CAAW,MAAW;QACvB,MAAM,CAAC,OAAO,GAAG,aAAa,CAAC;IACjC,CAAC;CACF,CAAA;AAHC;IAAK,mBAAA,IAAA,eAAM,GAAE,CAAA;;;;2CAEZ;AAHG,gBAAgB;IADrB,IAAA,mBAAU,GAAE;GACP,gBAAgB,CAIrB;AAGD,IAAM,QAAQ,GAAd,MAAM,QAAQ;IAIZ,aAAa;QACX,OAAO;YACL,KAAK,EAAE,OAAO;SACf,CAAC;IACJ,CAAC;IAID,aAAa;QACX,OAAO;YACL,KAAK,EAAE,OAAO;SACf,CAAC;IACJ,CAAC;CACF,CAAA;AAhBC;IAAC,IAAA,YAAG,EAAC,aAAa,CAAC;IAClB,IAAA,kBAAS,EAAC,gBAAgB,CAAC;IAC3B,IAAA,qBAAI,EAAC,UAAU,EAAE,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;;;;6CAKhC;AAED;IAAC,IAAA,YAAG,EAAC,aAAa,CAAC;IAClB,IAAA,qBAAI,EAAC,MAAM,EAAE,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC,CAAC,oBAAoB;;;;;6CAKjD;AAhBG,QAAQ;IADb,IAAA,mBAAU,EAAC,QAAQ,CAAC;GACf,QAAQ,CAiBb;AAED,SAAgB,QAAQ,CAAC,OAA+B;IACtD,IAAI,OAAwB,CAAC;IAE7B,SAAS,CACP,qBAAY,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE;QACrC,GAAG,OAAO;QACV,KAAK,EAAE;YACL,OAAO,EAAE,CAAC,QAAQ,CAAC;SACpB;KACF,CAAC,CACH,CAAC;IACF,SAAS,CAAC,GAAG,EAAE;QACb,OAAO,GAAG,IAAA,mBAAS,EAAC,qBAAY,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,qBAAY,CAAC,KAAK,CAAC,CAAC;IAE7B,QAAQ,CAAC,uCAAuC,EAAE,GAAG,EAAE;QACrD,EAAE,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE;YACpC,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAEzE,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC;YAC7E,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,kDAAkD,QAAG,EAAE,CAAC,CAAC;QACzF,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,uCAAuC,EAAE,GAAG,EAAE;QACrD,EAAE,CAAC,qDAAqD,EAAE,KAAK,IAAI,EAAE;YACnE,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAEzE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;YAC5D,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,oDAAoD,CAAC,CAAC;YAC9F,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAlCD,4BAkCC"}
|
package/lib/esm/package.json
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PlatformTestingSdkOpts } from "../interfaces/index.js";
|
|
2
|
-
export declare class PlatformTestSdk {
|
|
3
|
-
private options;
|
|
4
|
-
protected constructor(options: PlatformTestingSdkOpts);
|
|
5
|
-
static create(options: PlatformTestingSdkOpts): PlatformTestSdk;
|
|
6
|
-
test(name: string, options?: any): void;
|
|
7
|
-
bootstrap(options?: any): () => Promise<void>;
|
|
8
|
-
reset(): typeof import("@tsed/common").DITest.reset;
|
|
9
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ResponseErrorObject } from "@tsed/common";
|
|
2
|
-
import { BadRequest } from "@tsed/exceptions";
|
|
3
|
-
export declare class CustomBadRequest extends BadRequest implements ResponseErrorObject {
|
|
4
|
-
name: string;
|
|
5
|
-
errors: any[];
|
|
6
|
-
headers: {};
|
|
7
|
-
constructor(message: string);
|
|
8
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ResponseErrorObject } from "@tsed/common";
|
|
2
|
-
import { InternalServerError } from "@tsed/exceptions";
|
|
3
|
-
export declare class CustomInternalError extends InternalServerError implements ResponseErrorObject {
|
|
4
|
-
name: string;
|
|
5
|
-
errors: any[];
|
|
6
|
-
headers: {};
|
|
7
|
-
constructor(message: string);
|
|
8
|
-
}
|
package/lib/types-esm/index.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Automatically generated by @tsed/barrels.
|
|
3
|
-
*/
|
|
4
|
-
export * from "./components/PlatformTestSdk.js";
|
|
5
|
-
export * from "./errors/CustomBadRequest.js";
|
|
6
|
-
export * from "./errors/CustomInternalError.js";
|
|
7
|
-
export * from "./interfaces/index.js";
|
|
8
|
-
export * from "./interfaces/PlatformTestingSdkOpts.js";
|
|
9
|
-
export * from "./modules/feature/controllers/FeatureController.js";
|
|
10
|
-
export * from "./modules/feature/FeatureModule.js";
|
|
11
|
-
export * from "./tests/exports.js";
|
|
12
|
-
export * from "./tests/testAcceptMime.js";
|
|
13
|
-
export * from "./tests/testAuth.js";
|
|
14
|
-
export * from "./tests/testBodyParams.js";
|
|
15
|
-
export * from "./tests/testCache.js";
|
|
16
|
-
export * from "./tests/testChildrenControllers.js";
|
|
17
|
-
export * from "./tests/testCookies.js";
|
|
18
|
-
export * from "./tests/testCustom404.js";
|
|
19
|
-
export * from "./tests/testDeepQueryParams.js";
|
|
20
|
-
export * from "./tests/testErrors.js";
|
|
21
|
-
export * from "./tests/testHandlers.js";
|
|
22
|
-
export * from "./tests/testHeaderParams.js";
|
|
23
|
-
export * from "./tests/testHeaders.js";
|
|
24
|
-
export * from "./tests/testInheritanceController.js";
|
|
25
|
-
export * from "./tests/testLocals.js";
|
|
26
|
-
export * from "./tests/testLocation.js";
|
|
27
|
-
export * from "./tests/testMiddlewares.js";
|
|
28
|
-
export * from "./tests/testModule.js";
|
|
29
|
-
export * from "./tests/testMulter.js";
|
|
30
|
-
export * from "./tests/testPathParams.js";
|
|
31
|
-
export * from "./tests/testQueryParams.js";
|
|
32
|
-
export * from "./tests/testRedirect.js";
|
|
33
|
-
export * from "./tests/testResponse.js";
|
|
34
|
-
export * from "./tests/testResponseFilter.js";
|
|
35
|
-
export * from "./tests/testRouting.js";
|
|
36
|
-
export * from "./tests/testScopeRequest.js";
|
|
37
|
-
export * from "./tests/testSession.js";
|
|
38
|
-
export * from "./tests/testStatics.js";
|
|
39
|
-
export * from "./tests/testStream.js";
|
|
40
|
-
export * from "./tests/testView.js";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PlatformTestingSdkOpts } from "../interfaces/index.js";
|
|
2
|
-
export declare class TokenService {
|
|
3
|
-
private _token;
|
|
4
|
-
token(token?: string): string;
|
|
5
|
-
isValid(token: string | undefined): RegExpMatchArray | null;
|
|
6
|
-
}
|
|
7
|
-
export declare function OAuth(options?: any): Function;
|
|
8
|
-
export declare function testAuth(options: PlatformTestingSdkOpts): void;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PlatformTestingSdkOpts } from "../interfaces/index.js";
|
|
2
|
-
export declare class CookiesCtrl {
|
|
3
|
-
/**
|
|
4
|
-
* Handle request and get auth from cookies
|
|
5
|
-
* @param authorization
|
|
6
|
-
*/
|
|
7
|
-
scenario1(authorization: string): {
|
|
8
|
-
authorization: string;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export declare function testCookies(options: PlatformTestingSdkOpts): void;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import "@tsed/ajv";
|
|
2
|
-
import { PlatformTestingSdkOpts } from "../interfaces/index.js";
|
|
3
|
-
declare class CustomModel {
|
|
4
|
-
name: string;
|
|
5
|
-
}
|
|
6
|
-
declare class CustomPropModel {
|
|
7
|
-
roleItem: string;
|
|
8
|
-
}
|
|
9
|
-
export declare class ErrorsCtrl {
|
|
10
|
-
scenario1(): void;
|
|
11
|
-
scenario2(): void;
|
|
12
|
-
scenario3(): void;
|
|
13
|
-
scenario4(name: string): string;
|
|
14
|
-
scenario5(model: CustomModel): CustomModel;
|
|
15
|
-
scenario6(model: CustomPropModel): CustomPropModel;
|
|
16
|
-
scenario7(): void;
|
|
17
|
-
}
|
|
18
|
-
export declare function testErrors(options: PlatformTestingSdkOpts): void;
|
|
19
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Context } from "@tsed/common";
|
|
2
|
-
import { PlatformTestingSdkOpts } from "../interfaces/index.js";
|
|
3
|
-
export declare class MyModel {
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
}
|
|
7
|
-
export declare class HandlersCtrl {
|
|
8
|
-
scenario1(id: string): MyModel;
|
|
9
|
-
scenario2(ctx: Context, id: string): void;
|
|
10
|
-
scenario3(id: string): Promise<any>;
|
|
11
|
-
}
|
|
12
|
-
export declare function testHandlers(options: PlatformTestingSdkOpts): void;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Req } from "@tsed/common";
|
|
2
|
-
import { PlatformTestingSdkOpts } from "../interfaces/index.js";
|
|
3
|
-
export declare class HeaderParamsCtrl {
|
|
4
|
-
/**
|
|
5
|
-
* Handle request with a raw middleware + handler
|
|
6
|
-
* Get Authorization from header
|
|
7
|
-
* @param request
|
|
8
|
-
* @param auth
|
|
9
|
-
*/
|
|
10
|
-
scenario1(request: Req, auth: string): any;
|
|
11
|
-
scenario2(contentType: string): {
|
|
12
|
-
contentType: string;
|
|
13
|
-
};
|
|
14
|
-
testScenario3(token: string): any;
|
|
15
|
-
}
|
|
16
|
-
export declare function testHeaderParams(options: PlatformTestingSdkOpts): void;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PlatformResponse } from "@tsed/common";
|
|
2
|
-
import { PlatformTestingSdkOpts } from "../interfaces/index.js";
|
|
3
|
-
export declare class HeadersCtrl {
|
|
4
|
-
testScenario1(value: string[]): any;
|
|
5
|
-
testScenario2(): string;
|
|
6
|
-
testScenario3(response: PlatformResponse): string;
|
|
7
|
-
}
|
|
8
|
-
export declare function testHeaders(options: PlatformTestingSdkOpts): void;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { PlatformTestingSdkOpts } from "../interfaces/index.js";
|
|
2
|
-
export declare class Resource {
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
}
|
|
6
|
-
export declare class BaseController<T extends {
|
|
7
|
-
id: string;
|
|
8
|
-
}> {
|
|
9
|
-
resources: T[];
|
|
10
|
-
get(id: string): Promise<any>;
|
|
11
|
-
list(): Promise<any[]>;
|
|
12
|
-
}
|
|
13
|
-
export declare class ResourcesCtrl extends BaseController<Resource> {
|
|
14
|
-
resources: {
|
|
15
|
-
id: string;
|
|
16
|
-
name: string;
|
|
17
|
-
}[];
|
|
18
|
-
get(id: string): Promise<any>;
|
|
19
|
-
post(resource: Resource): Resource;
|
|
20
|
-
}
|
|
21
|
-
declare abstract class AttachmentController {
|
|
22
|
-
getAll(parentID: string): string;
|
|
23
|
-
}
|
|
24
|
-
export declare class FindingsController extends AttachmentController {
|
|
25
|
-
get(): string;
|
|
26
|
-
}
|
|
27
|
-
export declare abstract class TestBaseController {
|
|
28
|
-
scenario3(search: string): {
|
|
29
|
-
search: string;
|
|
30
|
-
};
|
|
31
|
-
scenario5(q: string): {
|
|
32
|
-
data: string;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
export declare class TestChildController extends TestBaseController {
|
|
36
|
-
scenario4(id: string): any;
|
|
37
|
-
scenario5(s: string): {
|
|
38
|
-
data: string;
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
export declare function testInheritanceController(options: PlatformTestingSdkOpts): void;
|
|
42
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import "@tsed/ajv";
|
|
2
|
-
import { MiddlewareMethods } from "@tsed/common";
|
|
3
|
-
import { Exception } from "@tsed/exceptions";
|
|
4
|
-
import { PlatformTestingSdkOpts } from "../interfaces/index.js";
|
|
5
|
-
export declare class CatchErrorMiddleware implements MiddlewareMethods {
|
|
6
|
-
use(err: Exception): void;
|
|
7
|
-
}
|
|
8
|
-
export declare function testMiddlewares(options: PlatformTestingSdkOpts): void;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { PlatformMulterFile } from "@tsed/common";
|
|
2
|
-
import { PlatformTestingSdkOpts } from "../interfaces/index.js";
|
|
3
|
-
export declare class Task {
|
|
4
|
-
id: string;
|
|
5
|
-
title: string;
|
|
6
|
-
}
|
|
7
|
-
export declare class Event {
|
|
8
|
-
id: string;
|
|
9
|
-
tasks: Task[];
|
|
10
|
-
}
|
|
11
|
-
export declare class TestMulterController {
|
|
12
|
-
uploadWithName(media: PlatformMulterFile): string;
|
|
13
|
-
uploadWithPayload(media: PlatformMulterFile, formId: string): {
|
|
14
|
-
file: string;
|
|
15
|
-
formId: string;
|
|
16
|
-
};
|
|
17
|
-
uploadWithOptions(media: PlatformMulterFile): {
|
|
18
|
-
file: string;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
export declare function testMulter(options: PlatformTestingSdkOpts): void;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { PlatformTestingSdkOpts } from "../interfaces/index.js";
|
|
2
|
-
export declare enum EnumValue {
|
|
3
|
-
One = "one",
|
|
4
|
-
Two = "two"
|
|
5
|
-
}
|
|
6
|
-
export declare class NestedEnum {
|
|
7
|
-
value: EnumValue;
|
|
8
|
-
}
|
|
9
|
-
export declare class TestNestedEnum {
|
|
10
|
-
nested: NestedEnum;
|
|
11
|
-
}
|
|
12
|
-
export declare class ModelGroup {
|
|
13
|
-
id: string;
|
|
14
|
-
groups: string;
|
|
15
|
-
}
|
|
16
|
-
export declare function testResponse(options: PlatformTestingSdkOpts): void;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { PlatformTestingSdkOpts } from "../interfaces/index.js";
|
|
2
|
-
export declare class ScopeRequestService {
|
|
3
|
-
user: string;
|
|
4
|
-
}
|
|
5
|
-
export declare class ScopeRequestCtrl {
|
|
6
|
-
scopeRequestService: ScopeRequestService;
|
|
7
|
-
userId: string | null;
|
|
8
|
-
constructor(scopeRequestService: ScopeRequestService);
|
|
9
|
-
$onDestroy(): void;
|
|
10
|
-
testPerRequest(userId: string): Promise<any>;
|
|
11
|
-
}
|
|
12
|
-
export declare function testScopeRequest(options: PlatformTestingSdkOpts): void;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { PlatformTestingSdkOpts } from "../interfaces/index.js";
|
|
2
|
-
export declare class UserCreation {
|
|
3
|
-
name: string;
|
|
4
|
-
email: string;
|
|
5
|
-
password: string;
|
|
6
|
-
}
|
|
7
|
-
export declare class User extends UserCreation {
|
|
8
|
-
password: string;
|
|
9
|
-
}
|
|
10
|
-
export declare class SessionCtrl {
|
|
11
|
-
platformName: string;
|
|
12
|
-
connect(session: any, user: UserCreation): Promise<UserCreation>;
|
|
13
|
-
userInfo(user: User): Promise<User>;
|
|
14
|
-
logout(req: any): any;
|
|
15
|
-
}
|
|
16
|
-
export declare function testSession(options: PlatformTestingSdkOpts): void;
|