Initial commit: GitHub-GCC WeCom bot for Gitea
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import type { AppConfig } from "../src/config.js";
|
||||
|
||||
export function testConfig(overrides: Partial<AppConfig> = {}): AppConfig {
|
||||
return {
|
||||
webhookSecret: "test-secret",
|
||||
wecomWebhookUrl: "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=test-key",
|
||||
maxMessageLength: 1800,
|
||||
deliveryTtlSeconds: 600,
|
||||
...overrides
|
||||
};
|
||||
}
|
||||
|
||||
export function testEnv(overrides: Record<string, unknown> = {}) {
|
||||
return {
|
||||
WEBHOOK_SECRET: "test-secret",
|
||||
WECOM_WEBHOOK_URL: "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=test-key",
|
||||
MAX_MESSAGE_LENGTH: "1800",
|
||||
DELIVERY_TTL_SECONDS: "600",
|
||||
...overrides
|
||||
} as never;
|
||||
}
|
||||
Reference in New Issue
Block a user