- 使用 PAYLOAD=$(cat <<ENDPAYLOAD) 替代 cat > file <<EOF - 确保环境变量在 heredoc 中正确展开 - 添加测试脚本验证环境变量展开 - 修复构建详情链接和消息内容缺失问题
This commit is contained in:
@@ -33,7 +33,7 @@ export async function GET(request: NextRequest) {
|
||||
}
|
||||
|
||||
const conditions = [];
|
||||
|
||||
|
||||
if (category) {
|
||||
conditions.push(eq(siteConfig.category, category as 'feature' | 'style' | 'seo' | 'general'));
|
||||
}
|
||||
@@ -46,8 +46,10 @@ export async function GET(request: NextRequest) {
|
||||
.where(whereClause)
|
||||
.orderBy(siteConfig.key);
|
||||
|
||||
const filteredConfigs = configs.filter(config => !config.key.startsWith('test_'));
|
||||
|
||||
return success({
|
||||
configs: configs,
|
||||
configs: filteredConfigs,
|
||||
});
|
||||
} catch (error) {
|
||||
return handleApiError(error);
|
||||
|
||||
Vendored
+29
-2
@@ -1,5 +1,32 @@
|
||||
import '@testing-library/jest-dom';
|
||||
|
||||
declare module 'expect' {
|
||||
interface Matchers<R, T> extends jest.Matchers<R, T> {}
|
||||
declare global {
|
||||
namespace jest {
|
||||
interface Matchers<R> {
|
||||
toBeInTheDocument(): R;
|
||||
toBeDisabled(): R;
|
||||
toBeEnabled(): R;
|
||||
toBeEmpty(): R;
|
||||
toBeEmptyDOMElement(): R;
|
||||
toBeInvalid(): R;
|
||||
toBeRequired(): R;
|
||||
toBeValid(): R;
|
||||
toBeVisible(): R;
|
||||
toContainElement(element: Element | null): R;
|
||||
toContainHTML(html: string): R;
|
||||
toHaveAccessibleDescription(description?: string | RegExp): R;
|
||||
toHaveAccessibleName(name?: string | RegExp): R;
|
||||
toHaveAttribute(attr: string, value?: string | RegExp): R;
|
||||
toHaveClass(...classNames: string[]): R;
|
||||
toHaveFocus(): R;
|
||||
toHaveFormValues(values: Record<string, unknown>): R;
|
||||
toHaveStyle(css: Record<string, unknown>): R;
|
||||
toHaveTextContent(text: string | RegExp, options?: { normalizeWhitespace: boolean }): R;
|
||||
toHaveValue(value?: string | string[] | number): R;
|
||||
toHaveDisplayValue(value?: string | string[] | RegExp): R;
|
||||
toBeChecked(): R;
|
||||
toBePartiallyChecked(): R;
|
||||
toHaveErrorMessage(message?: string | RegExp): R;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user