@tsed/platform-test-sdk 8.34.0 → 8.35.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/lib/esm/modules/feature/FeatureModule.js +1 -1
- package/lib/esm/modules/feature/controllers/FeatureController.js +1 -1
- package/lib/esm/tests/testAcceptMime.js +3 -3
- package/lib/esm/tests/testAuth.js +6 -6
- package/lib/esm/tests/testBodyParams.js +3 -3
- package/lib/esm/tests/testCache.js +3 -3
- package/lib/esm/tests/testChildrenControllers.js +2 -2
- package/lib/esm/tests/testCookies.js +3 -3
- package/lib/esm/tests/testCustom404.js +1 -1
- package/lib/esm/tests/testDeepQueryParams.js +3 -3
- package/lib/esm/tests/testErrors.js +7 -7
- package/lib/esm/tests/testHandlers.js +3 -3
- package/lib/esm/tests/testHeaderParams.js +5 -5
- package/lib/esm/tests/testHeaders.js +4 -4
- package/lib/esm/tests/testInheritanceController.js +4 -4
- package/lib/esm/tests/testLocals.js +5 -5
- package/lib/esm/tests/testLocation.js +2 -2
- package/lib/esm/tests/testMiddlewares.js +5 -5
- package/lib/esm/tests/testModule.js +3 -3
- package/lib/esm/tests/testMulter.js +6 -6
- package/lib/esm/tests/testPathParams.js +3 -3
- package/lib/esm/tests/testQueryParams.js +2 -2
- package/lib/esm/tests/testRedirect.js +3 -3
- package/lib/esm/tests/testResponse.js +5 -5
- package/lib/esm/tests/testResponseFilter.js +2 -2
- package/lib/esm/tests/testRouting.js +2 -2
- package/lib/esm/tests/testScopeRequest.js +3 -3
- package/lib/esm/tests/testSession.js +5 -5
- package/lib/esm/tests/testStatics.js +4 -4
- package/lib/esm/tests/testStream.js +4 -4
- package/lib/esm/tests/testView.js +6 -6
- package/lib/types/interfaces/PlatformTestingSdkOpts.d.ts +1 -1
- package/lib/types/tests/testHeaderParams.d.ts +1 -1
- package/package.json +22 -23
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
|
+
import { AcceptMime, ContentType, Get, Post } from "@tsed/schema";
|
|
3
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
2
4
|
import { Controller } from "@tsed/di";
|
|
3
|
-
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
4
5
|
import { HeaderParams } from "@tsed/platform-params";
|
|
5
|
-
import {
|
|
6
|
+
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
6
7
|
import SuperTest from "supertest";
|
|
7
|
-
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
8
8
|
let TestAcceptMimeCtrl = class TestAcceptMimeCtrl {
|
|
9
9
|
scenario1(accept) {
|
|
10
10
|
return {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
var OAuthMiddleware_1;
|
|
2
2
|
import { __decorate, __metadata, __param } from "tslib";
|
|
3
|
-
import { useDecorators } from "@tsed/core";
|
|
4
|
-
import { Controller, Inject, Injectable } from "@tsed/di";
|
|
5
3
|
import { BadRequest, Forbidden, Unauthorized } from "@tsed/exceptions";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { Controller, Inject, Injectable } from "@tsed/di";
|
|
5
|
+
import { Get, In, Post, Returns, Security } from "@tsed/schema";
|
|
8
6
|
import { Middleware, UseAuth } from "@tsed/platform-middlewares";
|
|
7
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
9
8
|
import { Context } from "@tsed/platform-params";
|
|
10
|
-
import {
|
|
9
|
+
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
10
|
+
import { Req } from "@tsed/platform-http";
|
|
11
11
|
import SuperTest from "supertest";
|
|
12
|
-
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
13
12
|
import baseSpec from "../data/swagger.json" with { type: "json" };
|
|
13
|
+
import { useDecorators } from "@tsed/core";
|
|
14
14
|
let TokenService = class TokenService {
|
|
15
15
|
constructor() {
|
|
16
16
|
this._token = "EMPTY";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
2
|
import "@tsed/ajv";
|
|
3
|
-
import { Controller } from "@tsed/di";
|
|
4
|
-
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
5
3
|
import { BodyParams, Context, HeaderParams, RawBodyParams } from "@tsed/platform-params";
|
|
6
4
|
import { Consumes, Default, Description, GenericOf, Generics, Maximum, Minimum, Nullable, Post, Property, Required, Status } from "@tsed/schema";
|
|
7
|
-
import SuperTest from "supertest";
|
|
8
5
|
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
6
|
+
import { Controller } from "@tsed/di";
|
|
7
|
+
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
8
|
+
import SuperTest from "supertest";
|
|
9
9
|
var MyEnum;
|
|
10
10
|
(function (MyEnum) {
|
|
11
11
|
MyEnum[MyEnum["TITLE"] = 0] = "TITLE";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
2
|
import { Controller, Inject } from "@tsed/di";
|
|
3
|
+
import { Get, Head, Post, Property } from "@tsed/schema";
|
|
4
|
+
import { PathParams, QueryParams } from "@tsed/platform-params";
|
|
3
5
|
import { PlatformCache, UseCache } from "@tsed/platform-cache";
|
|
6
|
+
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
|
4
7
|
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
5
|
-
import { PathParams, QueryParams } from "@tsed/platform-params";
|
|
6
|
-
import { Get, Head, Post, Property } from "@tsed/schema";
|
|
7
8
|
import SuperTest from "supertest";
|
|
8
|
-
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
|
9
9
|
let increment = 0;
|
|
10
10
|
export function testCache(options) {
|
|
11
11
|
let request;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
|
2
3
|
import { Controller } from "@tsed/di";
|
|
3
|
-
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
4
4
|
import { Get } from "@tsed/schema";
|
|
5
|
+
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
5
6
|
import SuperTest from "supertest";
|
|
6
|
-
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
|
7
7
|
export function testChildrenControllers(options) {
|
|
8
8
|
let request;
|
|
9
9
|
let TestChildController = class TestChildController {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
|
-
import { Controller } from "@tsed/di";
|
|
3
|
-
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
4
2
|
import { Context, CookiesParams } from "@tsed/platform-params";
|
|
3
|
+
import { afterAll, beforeAll, expect, it } from "vitest";
|
|
4
|
+
import { Controller } from "@tsed/di";
|
|
5
5
|
import { Get } from "@tsed/schema";
|
|
6
|
+
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
6
7
|
import SuperTest from "supertest";
|
|
7
|
-
import { afterAll, beforeAll, expect, it } from "vitest";
|
|
8
8
|
let CookiesCtrl = class CookiesCtrl {
|
|
9
9
|
/**
|
|
10
10
|
* Handle request and get auth from cookies
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { afterAll, beforeAll, expect, it } from "vitest";
|
|
1
2
|
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
2
3
|
import SuperTest from "supertest";
|
|
3
|
-
import { afterAll, beforeAll, expect, it } from "vitest";
|
|
4
4
|
export function testCustom404(options) {
|
|
5
5
|
class CustomServer extends options.server {
|
|
6
6
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
2
|
import "@tsed/ajv";
|
|
3
|
+
import { Context, QueryParams } from "@tsed/platform-params";
|
|
4
|
+
import { Default, GenericOf, Generics, Get, Maximum, Minimum, Property } from "@tsed/schema";
|
|
5
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
3
6
|
import { Controller } from "@tsed/di";
|
|
4
7
|
import { PlatformContext } from "@tsed/platform-http";
|
|
5
8
|
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
6
|
-
import { Context, QueryParams } from "@tsed/platform-params";
|
|
7
|
-
import { Default, GenericOf, Generics, Get, Maximum, Minimum, Property } from "@tsed/schema";
|
|
8
9
|
import SuperTest from "supertest";
|
|
9
|
-
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
10
10
|
class FindQuery {
|
|
11
11
|
}
|
|
12
12
|
__decorate([
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
2
|
import "@tsed/ajv";
|
|
3
|
-
import { Env } from "@tsed/core";
|
|
4
|
-
import { Controller } from "@tsed/di";
|
|
5
3
|
import { BadRequest, InternalServerError } from "@tsed/exceptions";
|
|
6
|
-
import { Err } from "@tsed/platform-http";
|
|
7
|
-
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
8
|
-
import { Middleware, UseAfter } from "@tsed/platform-middlewares";
|
|
9
|
-
import { BodyParams } from "@tsed/platform-params";
|
|
10
4
|
import { Description, Get, Name, Post, Required, Returns, Summary } from "@tsed/schema";
|
|
11
|
-
import
|
|
5
|
+
import { Middleware, UseAfter } from "@tsed/platform-middlewares";
|
|
12
6
|
import { afterAll, beforeAll, expect, it } from "vitest";
|
|
7
|
+
import { BodyParams } from "@tsed/platform-params";
|
|
8
|
+
import { Controller } from "@tsed/di";
|
|
13
9
|
import { CustomBadRequest } from "../errors/CustomBadRequest.js";
|
|
14
10
|
import { CustomInternalError } from "../errors/CustomInternalError.js";
|
|
11
|
+
import { Env } from "@tsed/core";
|
|
12
|
+
import { Err } from "@tsed/platform-http";
|
|
13
|
+
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
14
|
+
import SuperTest from "supertest";
|
|
15
15
|
class CustomModel {
|
|
16
16
|
}
|
|
17
17
|
__decorate([
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
|
-
import { Controller } from "@tsed/di";
|
|
3
|
-
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
4
2
|
import { Context, PathParams } from "@tsed/platform-params";
|
|
5
3
|
import { Get, Property, Required, Title } from "@tsed/schema";
|
|
6
|
-
import SuperTest from "supertest";
|
|
7
4
|
import { afterAll, beforeAll, expect, it } from "vitest";
|
|
5
|
+
import { Controller } from "@tsed/di";
|
|
6
|
+
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
7
|
+
import SuperTest from "supertest";
|
|
8
8
|
export class MyModel {
|
|
9
9
|
}
|
|
10
10
|
__decorate([
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
|
-
import { Controller } from "@tsed/di";
|
|
3
|
-
import { Req } from "@tsed/platform-http";
|
|
4
|
-
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
5
|
-
import { Middleware, Use } from "@tsed/platform-middlewares";
|
|
6
2
|
import { Context, HeaderParams, Locals } from "@tsed/platform-params";
|
|
7
3
|
import { Enum, Get, Post, Required } from "@tsed/schema";
|
|
8
|
-
import
|
|
4
|
+
import { Middleware, Use } from "@tsed/platform-middlewares";
|
|
9
5
|
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
6
|
+
import { Controller } from "@tsed/di";
|
|
7
|
+
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
8
|
+
import { Req } from "@tsed/platform-http";
|
|
9
|
+
import SuperTest from "supertest";
|
|
10
10
|
let SetId = class SetId {
|
|
11
11
|
use(request, locals, $ctx) {
|
|
12
12
|
request["user"] = 1;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
|
-
import {
|
|
2
|
+
import { Get, Returns } from "@tsed/schema";
|
|
3
3
|
import { PlatformResponse, Res } from "@tsed/platform-http";
|
|
4
|
-
import {
|
|
4
|
+
import { afterAll, beforeAll, expect, it } from "vitest";
|
|
5
5
|
import { BodyParams } from "@tsed/platform-params";
|
|
6
|
-
import {
|
|
6
|
+
import { Controller } from "@tsed/di";
|
|
7
|
+
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
7
8
|
import SuperTest from "supertest";
|
|
8
|
-
import { afterAll, beforeAll, expect, it } from "vitest";
|
|
9
9
|
let HeadersCtrl = class HeadersCtrl {
|
|
10
10
|
testScenario1(value) {
|
|
11
11
|
return "hello";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
|
+
import { BodyParams, PathParams, QueryParams } from "@tsed/platform-params";
|
|
3
|
+
import { Description, Get, MaxLength, MinLength, Post, Property, Returns, Summary } from "@tsed/schema";
|
|
4
|
+
import { Middleware, UseAuth } from "@tsed/platform-middlewares";
|
|
5
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
2
6
|
import { Controller } from "@tsed/di";
|
|
3
7
|
import { NotFound } from "@tsed/exceptions";
|
|
4
8
|
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
5
|
-
import { Middleware, UseAuth } from "@tsed/platform-middlewares";
|
|
6
|
-
import { BodyParams, PathParams, QueryParams } from "@tsed/platform-params";
|
|
7
|
-
import { Description, Get, MaxLength, MinLength, Post, Property, Returns, Summary } from "@tsed/schema";
|
|
8
9
|
import SuperTest from "supertest";
|
|
9
10
|
import { v4 } from "uuid";
|
|
10
|
-
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
11
11
|
export class Resource {
|
|
12
12
|
}
|
|
13
13
|
__decorate([
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
|
-
import { Controller } from "@tsed/di";
|
|
3
|
-
import { PlatformContext, Req } from "@tsed/platform-http";
|
|
4
|
-
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
5
|
-
import { Middleware, Use } from "@tsed/platform-middlewares";
|
|
6
2
|
import { Context, Locals } from "@tsed/platform-params";
|
|
3
|
+
import { Middleware, Use } from "@tsed/platform-middlewares";
|
|
4
|
+
import { PlatformContext, Req } from "@tsed/platform-http";
|
|
5
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
6
|
+
import { Controller } from "@tsed/di";
|
|
7
7
|
import { Get } from "@tsed/schema";
|
|
8
|
+
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
8
9
|
import SuperTest from "supertest";
|
|
9
|
-
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
10
10
|
let LocalsMiddleware = class LocalsMiddleware {
|
|
11
11
|
use(request, locals, ctx) {
|
|
12
12
|
locals.id = "local-10909";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { Get, Location } from "@tsed/schema";
|
|
3
|
+
import { afterAll, beforeAll, expect, it } from "vitest";
|
|
2
4
|
import { Controller } from "@tsed/di";
|
|
3
5
|
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
4
|
-
import { Get, Location } from "@tsed/schema";
|
|
5
6
|
import SuperTest from "supertest";
|
|
6
|
-
import { afterAll, beforeAll, expect, it } from "vitest";
|
|
7
7
|
let LocationCtrl = class LocationCtrl {
|
|
8
8
|
testScenario1() {
|
|
9
9
|
return "Hello";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
2
|
import "@tsed/ajv";
|
|
3
|
-
import { Controller } from "@tsed/di";
|
|
4
3
|
import { BadRequest, Exception, Unauthorized } from "@tsed/exceptions";
|
|
5
|
-
import { Err } from "@tsed/platform-http";
|
|
6
|
-
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
7
|
-
import { Middleware, Use, UseAfter, UseBefore } from "@tsed/platform-middlewares";
|
|
8
4
|
import { Context, QueryParams } from "@tsed/platform-params";
|
|
5
|
+
import { Middleware, Use, UseAfter, UseBefore } from "@tsed/platform-middlewares";
|
|
6
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
7
|
+
import { Controller } from "@tsed/di";
|
|
8
|
+
import { Err } from "@tsed/platform-http";
|
|
9
9
|
import { Get } from "@tsed/schema";
|
|
10
|
+
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
10
11
|
import SuperTest from "supertest";
|
|
11
|
-
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
12
12
|
let BeforeCustomMiddleware = class BeforeCustomMiddleware {
|
|
13
13
|
use(ctx) {
|
|
14
14
|
ctx.set("stacks", ["UseBefore - Ctrl"]);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
2
3
|
import { Controller } from "@tsed/di";
|
|
3
|
-
import {
|
|
4
|
+
import { FeatureModule } from "../modules/feature/FeatureModule.js";
|
|
4
5
|
import { Get } from "@tsed/schema";
|
|
6
|
+
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
5
7
|
import SuperTest from "supertest";
|
|
6
|
-
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
7
|
-
import { FeatureModule } from "../modules/feature/FeatureModule.js";
|
|
8
8
|
let TestRootCtrl = class TestRootCtrl {
|
|
9
9
|
testScenario1() {
|
|
10
10
|
return "From root";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
|
+
import { CollectionOf, Post, Property, Required, Status } from "@tsed/schema";
|
|
3
|
+
import { MulterOptions, MultipartFile } from "@tsed/platform-multer";
|
|
4
|
+
import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
|
|
2
5
|
import { dirname, join } from "node:path";
|
|
6
|
+
import multer from "multer";
|
|
7
|
+
import { BodyParams } from "@tsed/platform-params";
|
|
3
8
|
import { Controller } from "@tsed/di";
|
|
4
9
|
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
5
|
-
import { MulterOptions, MultipartFile } from "@tsed/platform-multer";
|
|
6
|
-
import { BodyParams } from "@tsed/platform-params";
|
|
7
|
-
import { CollectionOf, Post, Property, Required, Status } from "@tsed/schema";
|
|
8
|
-
import multer from "multer";
|
|
9
|
-
import readPkgUp from "read-pkg-up";
|
|
10
10
|
import SuperTest from "supertest";
|
|
11
|
-
import
|
|
11
|
+
import readPkgUp from "read-pkg-up";
|
|
12
12
|
const rootDir = import.meta.dirname; // automatically replaced by import.meta.dirname on build
|
|
13
13
|
export class Task {
|
|
14
14
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
|
-
import { Controller } from "@tsed/di";
|
|
3
|
-
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
4
2
|
import { Context, PathParams } from "@tsed/platform-params";
|
|
5
3
|
import { Get, Pattern, Post } from "@tsed/schema";
|
|
6
|
-
import SuperTest from "supertest";
|
|
7
4
|
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
5
|
+
import { Controller } from "@tsed/di";
|
|
6
|
+
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
7
|
+
import SuperTest from "supertest";
|
|
8
8
|
let TestPathParamsCtrl = class TestPathParamsCtrl {
|
|
9
9
|
testScenario1(scope) {
|
|
10
10
|
// Here scope will be {0: 'a', 1: 'b', 2: 'c'} instead of 'abc' in version 5.47.0
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
2
|
import "@tsed/ajv";
|
|
3
|
+
import { Get, Maximum, Minimum, Required } from "@tsed/schema";
|
|
4
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
3
5
|
import { Controller } from "@tsed/di";
|
|
4
6
|
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
5
7
|
import { QueryParams } from "@tsed/platform-params";
|
|
6
|
-
import { Get, Maximum, Minimum, Required } from "@tsed/schema";
|
|
7
8
|
import SuperTest from "supertest";
|
|
8
|
-
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
9
9
|
export class RandomStringModel {
|
|
10
10
|
}
|
|
11
11
|
__decorate([
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
|
+
import { Get, Location, Redirect } from "@tsed/schema";
|
|
3
|
+
import { afterAll, beforeAll, expect, it } from "vitest";
|
|
4
|
+
import { Context } from "@tsed/platform-params";
|
|
2
5
|
import { Controller } from "@tsed/di";
|
|
3
6
|
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
4
|
-
import { Context } from "@tsed/platform-params";
|
|
5
|
-
import { Get, Location, Redirect } from "@tsed/schema";
|
|
6
7
|
import SuperTest from "supertest";
|
|
7
|
-
import { afterAll, beforeAll, expect, it } from "vitest";
|
|
8
8
|
let RedirectCtrl = class RedirectCtrl {
|
|
9
9
|
testScenario1() {
|
|
10
10
|
return "Hello";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
|
+
import { CollectionOf, Enum, ForwardGroups, Get, Groups, Ignore, Name, Post, Property, Required, Returns, Status } from "@tsed/schema";
|
|
3
|
+
import { Context, PathParams } from "@tsed/platform-params";
|
|
2
4
|
import { Controller, getContext } from "@tsed/di";
|
|
3
5
|
import { PlatformResponse, Res } from "@tsed/platform-http";
|
|
6
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
4
7
|
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
8
|
+
import SuperTest from "supertest";
|
|
9
|
+
import { agent } from "superagent";
|
|
7
10
|
import axios from "axios";
|
|
8
11
|
import { of } from "rxjs";
|
|
9
|
-
import { agent } from "superagent";
|
|
10
|
-
import SuperTest from "supertest";
|
|
11
|
-
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
12
12
|
class Base {
|
|
13
13
|
}
|
|
14
14
|
__decorate([
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { Get, Property, Returns } from "@tsed/schema";
|
|
3
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
2
4
|
import { Controller } from "@tsed/di";
|
|
3
5
|
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
4
6
|
import { ResponseFilter } from "@tsed/platform-response-filter";
|
|
5
|
-
import { Get, Property, Returns } from "@tsed/schema";
|
|
6
7
|
import SuperTest from "supertest";
|
|
7
|
-
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
8
8
|
class ResponseFilterModel {
|
|
9
9
|
}
|
|
10
10
|
__decorate([
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { Get, Put } from "@tsed/schema";
|
|
3
|
+
import { afterAll, afterEach, beforeAll, expect, it, vi } from "vitest";
|
|
2
4
|
import { Controller } from "@tsed/di";
|
|
3
5
|
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
4
|
-
import { Get, Put } from "@tsed/schema";
|
|
5
6
|
import SuperTest from "supertest";
|
|
6
|
-
import { afterAll, afterEach, beforeAll, expect, it, vi } from "vitest";
|
|
7
7
|
const stub = vi.fn();
|
|
8
8
|
let TestRoutingController = class TestRoutingController {
|
|
9
9
|
scenario1() {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
2
|
import { Controller, ProviderScope, Scope, Service } from "@tsed/di";
|
|
3
|
-
import {
|
|
4
|
-
import { PathParams } from "@tsed/platform-params";
|
|
3
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
5
4
|
import { Get } from "@tsed/schema";
|
|
5
|
+
import { PathParams } from "@tsed/platform-params";
|
|
6
|
+
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
6
7
|
import SuperTest from "supertest";
|
|
7
|
-
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
8
8
|
let ScopeRequestService = class ScopeRequestService {
|
|
9
9
|
};
|
|
10
10
|
ScopeRequestService = __decorate([
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
|
-
import {
|
|
2
|
+
import { Allow, Email, Get, Ignore, MinLength, Post, Property, Required, Returns } from "@tsed/schema";
|
|
3
|
+
import { BodyParams, Session } from "@tsed/platform-params";
|
|
3
4
|
import { Constant, Controller } from "@tsed/di";
|
|
5
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
4
6
|
import { NotFound } from "@tsed/exceptions";
|
|
5
|
-
import { Req } from "@tsed/platform-http";
|
|
6
7
|
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
7
|
-
import {
|
|
8
|
-
import { Allow, Email, Get, Ignore, MinLength, Post, Property, Required, Returns } from "@tsed/schema";
|
|
8
|
+
import { Req } from "@tsed/platform-http";
|
|
9
9
|
import SuperTest from "supertest";
|
|
10
|
-
import {
|
|
10
|
+
import { promisify } from "node:util";
|
|
11
11
|
export class UserCreation {
|
|
12
12
|
}
|
|
13
13
|
__decorate([
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
|
-
import { readFileSync } from "node:fs";
|
|
3
|
-
import { getValue } from "@tsed/core";
|
|
4
2
|
import { Configuration, Controller } from "@tsed/di";
|
|
5
|
-
import {
|
|
3
|
+
import { afterEach, beforeEach, expect, it } from "vitest";
|
|
6
4
|
import { PlatformRouter } from "@tsed/platform-router";
|
|
5
|
+
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
7
6
|
import SuperTest from "supertest";
|
|
8
|
-
import {
|
|
7
|
+
import { getValue } from "@tsed/core";
|
|
8
|
+
import { readFileSync } from "node:fs";
|
|
9
9
|
let CustomStaticsCtrl = class CustomStaticsCtrl {
|
|
10
10
|
constructor(router, config) {
|
|
11
11
|
router.statics("/", {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { ContentType, Get } from "@tsed/schema";
|
|
3
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
4
4
|
import { Controller } from "@tsed/di";
|
|
5
5
|
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
6
|
-
import { ContentType, Get } from "@tsed/schema";
|
|
7
6
|
import SuperTest from "supertest";
|
|
8
|
-
import {
|
|
7
|
+
import { createReadStream } from "node:fs";
|
|
8
|
+
import { join } from "node:path";
|
|
9
9
|
const rootDir = import.meta.dirname; // automatically replaced by import.meta.dirname on build
|
|
10
10
|
let TestStreamCtrl = class TestStreamCtrl {
|
|
11
11
|
testScenario1() {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
|
-
import { EOL } from "node:os";
|
|
3
|
-
import { Controller } from "@tsed/di";
|
|
4
|
-
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
5
2
|
import { Middleware, UseBefore } from "@tsed/platform-middlewares";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
4
|
+
import { Controller } from "@tsed/di";
|
|
5
|
+
import { EOL } from "node:os";
|
|
8
6
|
import { Get } from "@tsed/schema";
|
|
7
|
+
import { Locals } from "@tsed/platform-params";
|
|
8
|
+
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
9
9
|
import SuperTest from "supertest";
|
|
10
|
-
import {
|
|
10
|
+
import { View } from "@tsed/platform-views";
|
|
11
11
|
let LocalsMiddleware = class LocalsMiddleware {
|
|
12
12
|
use(locals) {
|
|
13
13
|
locals.localID = "local-10909";
|
package/package.json
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/platform-test-sdk",
|
|
3
|
+
"version": "8.35.0",
|
|
3
4
|
"description": "Package to test platform adapter integration with Ts.ED",
|
|
4
|
-
"
|
|
5
|
-
|
|
5
|
+
"keywords": [
|
|
6
|
+
"Adapter",
|
|
7
|
+
"Platform",
|
|
8
|
+
"Testing",
|
|
9
|
+
"Ts.ED",
|
|
10
|
+
"sdk"
|
|
11
|
+
],
|
|
6
12
|
"source": "./src/index.ts",
|
|
13
|
+
"type": "module",
|
|
7
14
|
"main": "./lib/esm/index.js",
|
|
8
15
|
"module": "./lib/esm/index.js",
|
|
9
16
|
"typings": "./lib/types/index.d.ts",
|
|
@@ -20,34 +27,26 @@
|
|
|
20
27
|
"barrels": "barrels",
|
|
21
28
|
"build:ts": "tsc --build tsconfig.esm.json"
|
|
22
29
|
},
|
|
23
|
-
"keywords": [
|
|
24
|
-
"Ts.ED",
|
|
25
|
-
"Testing",
|
|
26
|
-
"sdk",
|
|
27
|
-
"Platform",
|
|
28
|
-
"Adapter"
|
|
29
|
-
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@tsed/ajv": "8.
|
|
32
|
-
"@tsed/core": "8.
|
|
33
|
-
"@tsed/di": "8.
|
|
34
|
-
"@tsed/json-mapper": "8.
|
|
31
|
+
"@tsed/ajv": "8.35.0",
|
|
32
|
+
"@tsed/core": "8.35.0",
|
|
33
|
+
"@tsed/di": "8.35.0",
|
|
34
|
+
"@tsed/json-mapper": "8.35.0",
|
|
35
35
|
"@tsed/logger": "8.0.0",
|
|
36
|
-
"@tsed/platform-cache": "8.
|
|
37
|
-
"@tsed/platform-http": "8.
|
|
38
|
-
"@tsed/platform-params": "8.
|
|
39
|
-
"@tsed/platform-router": "8.
|
|
40
|
-
"@tsed/platform-views": "8.
|
|
41
|
-
"@tsed/schema": "8.
|
|
42
|
-
"@tsed/swagger": "8.
|
|
36
|
+
"@tsed/platform-cache": "8.35.0",
|
|
37
|
+
"@tsed/platform-http": "8.35.0",
|
|
38
|
+
"@tsed/platform-params": "8.35.0",
|
|
39
|
+
"@tsed/platform-router": "8.35.0",
|
|
40
|
+
"@tsed/platform-views": "8.35.0",
|
|
41
|
+
"@tsed/schema": "8.35.0",
|
|
42
|
+
"@tsed/swagger": "8.35.0",
|
|
43
43
|
"ajv": "^8.17.1",
|
|
44
44
|
"axios": "1.15.2",
|
|
45
45
|
"read-pkg-up": "7.0.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@tsed/barrels": "8.
|
|
49
|
-
"@tsed/typescript": "8.
|
|
50
|
-
"eslint": "9.12.0",
|
|
48
|
+
"@tsed/barrels": "8.35.0",
|
|
49
|
+
"@tsed/typescript": "8.35.0",
|
|
51
50
|
"typescript": "6.0.2"
|
|
52
51
|
},
|
|
53
52
|
"peerDependencies": {},
|