mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 03:12:15 +00:00
refactor(core): Update supertest, and fix some typing errors (no-changelog) (#9527)
This commit is contained in:
committed by
GitHub
parent
47d774100b
commit
08902bf941
@@ -1,10 +0,0 @@
|
||||
import superagent = require('superagent');
|
||||
|
||||
/**
|
||||
* Make `SuperTest<T>` string-indexable.
|
||||
*/
|
||||
declare module 'supertest' {
|
||||
interface SuperTest<T extends superagent.SuperAgentRequest>
|
||||
extends superagent.SuperAgent<T>,
|
||||
Record<string, any> {}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Application } from 'express';
|
||||
import type { ICredentialDataDecryptedObject } from 'n8n-workflow';
|
||||
import type { SuperAgentTest } from 'supertest';
|
||||
import type TestAgent from 'supertest/lib/agent';
|
||||
import type { Server } from 'http';
|
||||
|
||||
import type { CredentialsEntity } from '@db/entities/CredentialsEntity';
|
||||
@@ -44,12 +44,14 @@ export interface SetupProps {
|
||||
quotas?: Partial<{ [K in NumericLicenseFeature]: number }>;
|
||||
}
|
||||
|
||||
export type SuperAgentTest = TestAgent;
|
||||
|
||||
export interface TestServer {
|
||||
app: Application;
|
||||
httpServer: Server;
|
||||
authAgentFor: (user: User) => SuperAgentTest;
|
||||
publicApiAgentFor: (user: User) => SuperAgentTest;
|
||||
authlessAgent: SuperAgentTest;
|
||||
authAgentFor: (user: User) => TestAgent;
|
||||
publicApiAgentFor: (user: User) => TestAgent;
|
||||
authlessAgent: TestAgent;
|
||||
license: LicenseMocker;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user