import { Routes } from '@rondo.dev/http-types'; import { RPCClient } from '@rondo.dev/jsonrpc'; import { AppServer } from '../application/AppServer'; import { Bootstrap } from '../application/Bootstrap'; import { RequestTester } from './RequestTester'; import { TypeORMTransactionManager } from '@rondo.dev/db-typeorm'; export declare class TestUtils { readonly bootstrap: Bootstrap; readonly username: string; readonly password = "Password10"; readonly app: AppServer; readonly context: string; readonly transactionManager: TypeORMTransactionManager; constructor(bootstrap: Bootstrap); createTestUsername(id?: number): string; /** * Set up beforeEach and afterEach cases for jest tests. Helps create and * execute the tests in transaction, and rolls it back in the end. */ withDatabase(): void; getError(promise: Promise): Promise; getCsrf(): Promise<{ cookie: string; token: string; }>; protected getCsrfToken(responseText: string): string; getLoginBody(csrfToken: string, username?: string): { username: string; password: string; _csrf: string; }; registerAccount(username?: string): Promise<{ headers: { 'cookie': string; 'x-csrf-token': string; }; userId: any; }>; login(username?: string, password?: string): Promise<{ headers: { 'cookie': string; 'x-csrf-token': string; }; }>; request: (baseUrl?: string) => RequestTester; /** * Starts the server, invokes a rpc method, and closes the server after * invocation. */ rpc: (serviceUrl: string, methods: { [K in keyof S]: K extends string ? S[K] extends (...args: any[]) => any ? K : never : never; }[keyof S][], headers: Record) => RPCClient; private getCookies; } //# sourceMappingURL=TestUtils.d.ts.map