@lit-protocol/e2e
Version:
Lit Protocol E2E testing package for running comprehensive integration tests
87 lines • 3.2 kB
TypeScript
/**
* @file Lit Protocol E2E Testing Package
* @description Provides programmatic access to run comprehensive E2E tests for Lit Protocol
* @author Lit Protocol
* @version 1.0.0
*
* Usage:
* ```typescript
* import { runLitE2eTests } from '@litprotocol/e2e';
*
* const results = await runLitE2eTests({
* network: 'naga-dev',
* logLevel: 'info',
* selectedTests: ['pkpSign', 'executeJs'] // optional: run specific tests
* });
* ```
*/
import { z } from 'zod';
declare const SUPPORTED_NETWORKS: readonly ["naga-dev", "naga-local", "naga-staging"];
declare const LOG_LEVELS: readonly ["silent", "info", "debug"];
declare const AVAILABLE_TESTS: readonly ["pkpSign", "executeJs", "viewPKPsByAddress", "viewPKPsByAuthData", "pkpEncryptDecrypt", "encryptDecryptFlow", "pkpPermissionsManagerFlow", "viemSignMessage", "viemSignTransaction", "viemSignTypedData", "eoaNativeAuthFlow"];
declare const LogLevelSchema: z.ZodEnum<["silent", "info", "debug"]>;
declare const TestNameSchema: z.ZodEnum<["pkpSign", "executeJs", "viewPKPsByAddress", "viewPKPsByAuthData", "pkpEncryptDecrypt", "encryptDecryptFlow", "pkpPermissionsManagerFlow", "viemSignMessage", "viemSignTransaction", "viemSignTypedData", "eoaNativeAuthFlow"]>;
export type SupportedNetwork = typeof SUPPORTED_NETWORKS[number];
export type LogLevel = z.infer<typeof LogLevelSchema>;
export type TestName = z.infer<typeof TestNameSchema>;
export interface E2ETestConfig {
/** The network to run tests against */
network: SupportedNetwork;
/** Logging level for test output */
logLevel?: LogLevel;
/** Specific tests to run (if not provided, runs all tests) */
selectedTests?: TestName[];
/** Timeout for individual tests in milliseconds */
testTimeout?: number;
}
export interface TestResult {
name: string;
authContext: string;
category: 'endpoints' | 'integrations';
status: 'passed' | 'failed' | 'skipped';
duration: number;
error?: string;
details?: Record<string, any>;
}
export interface E2ETestResults {
network: SupportedNetwork;
totalTests: number;
passed: number;
failed: number;
skipped: number;
duration: number;
results: TestResult[];
summary: {
eoaAuth: {
passed: number;
failed: number;
skipped: number;
};
pkpAuth: {
passed: number;
failed: number;
skipped: number;
};
customAuth: {
passed: number;
failed: number;
skipped: number;
};
eoaNative: {
passed: number;
failed: number;
skipped: number;
};
};
}
/**
* Main function to run Lit Protocol E2E tests programmatically
* @param config Configuration object for the test run
* @returns Promise resolving to test results
*/
export declare function runLitE2eTests(config: E2ETestConfig): Promise<E2ETestResults>;
export { init } from './init';
export { createCustomAuthContext, createPkpAuthContext } from './helper/auth-contexts';
export * from './helper/tests';
export { SUPPORTED_NETWORKS, LOG_LEVELS, AVAILABLE_TESTS };
//# sourceMappingURL=index.d.ts.map