1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-20 00:08:02 +01:00

chore(deps): update dependency @types/supertest to v6 (#5926)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
Jaanus Sellin 2024-01-17 13:36:17 +02:00 committed by GitHub
parent 5fb2ac8054
commit ee08bd8d42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 56 additions and 37 deletions

View File

@ -172,7 +172,7 @@
"@types/pg": "8.10.9",
"@types/semver": "7.5.6",
"@types/stoppable": "1.1.3",
"@types/supertest": "2.0.16",
"@types/supertest": "6.0.2",
"@types/type-is": "1.6.6",
"@types/uuid": "9.0.7",
"concurrently": "^8.0.1",

View File

@ -1,4 +1,4 @@
import supertest from 'supertest';
import supertest, { Test } from 'supertest';
import createStores from '../../../../test/fixtures/store';
import getLogger from '../../../../test/fixtures/no-logger';
import getApp from '../../../app';
@ -9,6 +9,7 @@ import { secondsToMilliseconds } from 'date-fns';
import { ClientSpecService } from '../../../services/client-spec-service';
import { Application } from 'express';
import { IFlagResolver } from '../../../types';
import TestAgent from 'supertest/lib/agent';
let app: Application;
@ -41,7 +42,7 @@ const callGetAll = async (controller: FeatureController) => {
};
let base: string;
let request: supertest.SuperTest<supertest.Test>;
let request: TestAgent<Test>;
let flagResolver: Partial<IFlagResolver>;

View File

@ -1,4 +1,4 @@
import supertest from 'supertest';
import supertest, { Test } from 'supertest';
import getApp from '../../../app';
import { createTestConfig } from '../../../../test/config/test-config';
import { clientMetricsSchema } from '../shared/schema';
@ -12,6 +12,7 @@ import {
import dbInit, { ITestDb } from '../../../../test/e2e/helpers/database-init';
import { subMinutes } from 'date-fns';
import { ApiTokenType } from '../../../types/models/api-token';
import TestAgent from 'supertest/lib/agent';
let db: ITestDb;
@ -30,7 +31,7 @@ async function getSetup(opts?: IUnleashOptions) {
};
}
let request: supertest.SuperTest<supertest.Test>;
let request: TestAgent<Test>;
let stores: IUnleashStores;
let services: IUnleashServices;
let destroy: () => Promise<void>;

View File

@ -1,9 +1,10 @@
import supertest from 'supertest';
import supertest, { Test } from 'supertest';
import { createTestConfig } from '../../../../test/config/test-config';
import createStores from '../../../../test/fixtures/store';
import getLogger from '../../../../test/fixtures/no-logger';
import getApp from '../../../app';
import { createServices } from '../../../services';
import TestAgent from 'supertest/lib/agent';
async function getSetup() {
const stores = createStores();
@ -16,7 +17,7 @@ async function getSetup() {
stores,
};
}
let request: supertest.SuperTest<supertest.Test>;
let request: TestAgent<Test>;
beforeEach(async () => {
const setup = await getSetup();
request = setup.request;

View File

@ -1,4 +1,4 @@
import supertest from 'supertest';
import supertest, { Test } from 'supertest';
import { createTestConfig } from '../../../test/config/test-config';
import createStores from '../../../test/fixtures/store';
@ -8,6 +8,7 @@ import {
DEFAULT_SEGMENT_VALUES_LIMIT,
DEFAULT_STRATEGY_SEGMENTS_LIMIT,
} from '../../util/segments';
import TestAgent from 'supertest/lib/agent';
const uiConfig = {
headerBackground: 'red',
@ -31,7 +32,7 @@ async function getSetup() {
};
}
let request: supertest.SuperTest<supertest.Test>;
let request: TestAgent<Test>;
let base: string;
beforeEach(async () => {

View File

@ -1,9 +1,10 @@
import supertest from 'supertest';
import supertest, { Test } from 'supertest';
import { createTestConfig } from '../../../test/config/test-config';
import createStores from '../../../test/fixtures/store';
import { createServices } from '../../services';
import permissions from '../../../test/fixtures/permissions';
import getApp from '../../app';
import TestAgent from 'supertest/lib/agent';
async function getSetup() {
const base = `/random${Math.round(Math.random() * 1000)}`;
@ -24,7 +25,7 @@ async function getSetup() {
}
let base: string;
let request: supertest.SuperTest<supertest.Test>;
let request: TestAgent<Test>;
beforeEach(async () => {
const setup = await getSetup();

View File

@ -1,10 +1,11 @@
import supertest from 'supertest';
import supertest, { Test } from 'supertest';
import createStores from '../../../test/fixtures/store';
import permissions from '../../../test/fixtures/permissions';
import getApp from '../../app';
import { createTestConfig } from '../../../test/config/test-config';
import { createServices } from '../../services';
import { IUnleashStores } from '../../types';
import TestAgent from 'supertest/lib/agent';
async function getSetup() {
const stores = createStores();
@ -24,7 +25,7 @@ async function getSetup() {
}
let stores: IUnleashStores;
let request: supertest.SuperTest<supertest.Test>;
let request: TestAgent<Test>;
beforeEach(async () => {
const setup = await getSetup();

View File

@ -2,10 +2,11 @@ import createStores from '../../../test/fixtures/store';
import { createTestConfig } from '../../../test/config/test-config';
import { createServices } from '../../services';
import getApp from '../../app';
import supertest from 'supertest';
import supertest, { Test } from 'supertest';
import permissions from '../../../test/fixtures/permissions';
import { RoleName, RoleType } from '../../types/model';
import { IUnleashStores } from '../../types';
import TestAgent from 'supertest/lib/agent';
describe('Public Signup API', () => {
async function getSetup() {
@ -38,7 +39,7 @@ describe('Public Signup API', () => {
}
let stores: IUnleashStores;
let request: supertest.SuperTest<supertest.Test>;
let request: TestAgent<Test>;
const user = {
username: 'some-username',

View File

@ -1,10 +1,11 @@
import supertest from 'supertest';
import supertest, { Test } from 'supertest';
import createStores from '../../../test/fixtures/store';
import permissions from '../../../test/fixtures/permissions';
import getApp from '../../app';
import { createTestConfig } from '../../../test/config/test-config';
import { createServices } from '../../services';
import { ITagStore } from '../../types';
import TestAgent from 'supertest/lib/agent';
async function getSetup() {
const base = `/random${Math.round(Math.random() * 1000)}`;
@ -27,7 +28,7 @@ async function getSetup() {
let base: string;
let tagStore: ITagStore;
let request: supertest.SuperTest<supertest.Test>;
let request: TestAgent<Test>;
beforeEach(async () => {
const setup = await getSetup();

View File

@ -1,10 +1,11 @@
import supertest from 'supertest';
import supertest, { Test } from 'supertest';
import { createServices } from '../services';
import { createTestConfig } from '../../test/config/test-config';
import createStores from '../../test/fixtures/store';
import getLogger from '../../test/fixtures/no-logger';
import getApp from '../app';
import TestAgent from 'supertest/lib/agent';
async function getSetup() {
const stores = createStores();
@ -17,7 +18,7 @@ async function getSetup() {
stores,
};
}
let request: supertest.SuperTest<supertest.Test>;
let request: TestAgent<Test>;
beforeEach(async () => {
const setup = await getSetup();
request = setup.request;

View File

@ -2,10 +2,11 @@ import createStores from '../../test/fixtures/store';
import { createTestConfig } from '../../test/config/test-config';
import { createServices } from '../services';
import getApp from '../app';
import supertest from 'supertest';
import supertest, { Test } from 'supertest';
import permissions from '../../test/fixtures/permissions';
import { RoleName, RoleType } from '../types/model';
import { IUnleashStores } from 'lib/types';
import TestAgent from 'supertest/lib/agent';
describe('Public Signup API', () => {
async function getSetup() {
@ -51,7 +52,7 @@ describe('Public Signup API', () => {
}
let stores: IUnleashStores;
let request: supertest.SuperTest<supertest.Test>;
let request: TestAgent<Test>;
const user = {
username: 'some-username',

View File

@ -21,11 +21,13 @@ import {
ImportTogglesSchema,
} from '../../../lib/openapi';
import { Knex } from 'knex';
import TestAgent from 'supertest/lib/agent';
import Test from 'supertest/lib/test';
process.env.NODE_ENV = 'test';
export interface IUnleashTest extends IUnleashHttpAPI {
request: supertest.SuperAgentTest;
request: TestAgent<Test>;
destroy: () => Promise<void>;
services: IUnleashServices;
config: IUnleashConfig;
@ -108,7 +110,7 @@ export interface IUnleashHttpAPI {
}
function httpApis(
request: supertest.SuperAgentTest,
request: TestAgent<Test>,
config: IUnleashConfig,
): IUnleashHttpAPI {
const base = config.server.baseUriPath || '';

View File

@ -1339,10 +1339,10 @@
dependencies:
"@types/node" "*"
"@types/cookiejar@*":
version "2.1.2"
resolved "https://registry.yarnpkg.com/@types/cookiejar/-/cookiejar-2.1.2.tgz#66ad9331f63fe8a3d3d9d8c6e3906dd10f6446e8"
integrity sha512-t73xJJrvdTjXrn4jLS9VSGRbz0nUY3cl2DMGDU48lKl+HR9dbbjW2A9r3g40VA++mQpy6uuHg33gy7du2BKpog==
"@types/cookiejar@^2.1.5":
version "2.1.5"
resolved "https://registry.yarnpkg.com/@types/cookiejar/-/cookiejar-2.1.5.tgz#14a3e83fa641beb169a2dd8422d91c3c345a9a78"
integrity sha512-he+DHOWReW0nghN24E1WUqM0efK4kI9oTqDm6XmK8ZPe2djZ90BSNdGnIyCLzCPw7/pogPlGbzI2wHGGmi4O/Q==
"@types/cors@2.8.17":
version "2.8.17"
@ -1488,6 +1488,11 @@
resolved "https://registry.yarnpkg.com/@types/memoizee/-/memoizee-0.4.11.tgz#da8897f0064bff3e845b5185e2a323bbd5c8d0a3"
integrity sha512-2gyorIBZu8GoDr9pYjROkxWWcFtHCquF7TVbN2I+/OvgZhnIGQS0vX5KJz4lXNKb8XOSfxFOSG5OLru1ESqLUg==
"@types/methods@^1.1.4":
version "1.1.4"
resolved "https://registry.yarnpkg.com/@types/methods/-/methods-1.1.4.tgz#d3b7ac30ac47c91054ea951ce9eed07b1051e547"
integrity sha512-ymXWVrDiCxTBE3+RIrrP533E70eA+9qu7zdWoHuOmGujkYtzf4HQF96b8nwHLqhuf4ykX61IGRIB38CC6/sImQ==
"@types/mime@*":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@types/mime/-/mime-3.0.1.tgz#5f8f2bca0a5863cb69bc0b0acd88c96cb1d4ae10"
@ -1608,20 +1613,22 @@
dependencies:
"@types/node" "*"
"@types/superagent@*":
version "4.1.16"
resolved "https://registry.yarnpkg.com/@types/superagent/-/superagent-4.1.16.tgz#12c9c16f232f9d89beab91d69368f96ce8e2d881"
integrity sha512-tLfnlJf6A5mB6ddqF159GqcDizfzbMUB1/DeT59/wBNqzRTNNKsaw79A/1TZ84X+f/EwWH8FeuSkjlCLyqS/zQ==
"@types/superagent@^8.1.0":
version "8.1.1"
resolved "https://registry.yarnpkg.com/@types/superagent/-/superagent-8.1.1.tgz#dbc620c5df3770b0c3092f947d6d5e808adae2bc"
integrity sha512-YQyEXA4PgCl7EVOoSAS3o0fyPFU6erv5mMixztQYe1bqbWmmn8c+IrqoxjQeZe4MgwXikgcaZPiI/DsbmOVlzA==
dependencies:
"@types/cookiejar" "*"
"@types/cookiejar" "^2.1.5"
"@types/methods" "^1.1.4"
"@types/node" "*"
"@types/supertest@2.0.16":
version "2.0.16"
resolved "https://registry.yarnpkg.com/@types/supertest/-/supertest-2.0.16.tgz#7a1294edebecb960d957bbe9b26002a2b7f21cd7"
integrity sha512-6c2ogktZ06tr2ENoZivgm7YnprnhYE4ZoXGMY+oA7IuAf17M8FWvujXZGmxLv8y0PTyts4x5A+erSwVUFA8XSg==
"@types/supertest@6.0.2":
version "6.0.2"
resolved "https://registry.yarnpkg.com/@types/supertest/-/supertest-6.0.2.tgz#2af1c466456aaf82c7c6106c6b5cbd73a5e86588"
integrity sha512-137ypx2lk/wTQbW6An6safu9hXmajAifU/s7szAHLN/FeIm5w7yR0Wkl9fdJMRSHwOn4HLAI0DaB2TOORuhPDg==
dependencies:
"@types/superagent" "*"
"@types/methods" "^1.1.4"
"@types/superagent" "^8.1.0"
"@types/type-is@1.6.6":
version "1.6.6"