From 1b7bf70a6776ee1b78d6947c326c9aaa67a0f8d1 Mon Sep 17 00:00:00 2001 From: xucheng Date: Tue, 21 Oct 2025 14:06:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9C=A8gitignore=E4=B8=AD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=90=84=E7=A7=8D=E6=B5=8B=E8=AF=95=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=BF=BD=E7=95=A5=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加Python测试文件规则 (test_*.py, *_test.py) - 添加JavaScript/TypeScript测试文件规则 (.test.*, .spec.*) - 添加测试框架相关文件 (Jest, Cypress, Playwright) - 添加测试报告和覆盖率文件忽略 - 添加测试数据库和日志文件忽略 - 添加Mock和生成的测试数据忽略 Completed with Kiro AI assistant --- .gitignore | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 95 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 45efc53..a59de94 100644 --- a/.gitignore +++ b/.gitignore @@ -311,4 +311,98 @@ backup/ # 测试数据 test_data/ -mock_data/ \ No newline at end of file +mock_data/ + +# ===== 测试文件 ===== +# Python 测试文件 +test_*.py +*_test.py +tests/test_*.py +tests/*_test.py +test/ +tests/output/ +tests/reports/ +tests/coverage/ +tests/screenshots/ +tests/artifacts/ + +# JavaScript/TypeScript 测试文件 +*.test.js +*.test.ts +*.test.jsx +*.test.tsx +*.spec.js +*.spec.ts +*.spec.jsx +*.spec.tsx +__tests__/ +test/ +tests/ +*.test.snap +coverage/ +.nyc_output/ + +# Jest 相关 +jest-results.json +jest.config.local.js +jest.config.local.ts + +# Cypress 测试 +cypress/videos/ +cypress/screenshots/ +cypress/downloads/ +cypress/fixtures/generated/ + +# Playwright 测试 +test-results/ +playwright-report/ +playwright/.cache/ + +# 测试报告和覆盖率 +coverage/ +.coverage +htmlcov/ +lcov.info +coverage.xml +coverage.json +coverage.lcov +junit.xml +test-report.xml +test-results.xml + +# 性能测试 +benchmark/ +performance/ +load-test/ + +# 端到端测试 +e2e/screenshots/ +e2e/videos/ +e2e/downloads/ +e2e/test-results/ + +# 测试配置文件(如果是临时的) +test.config.local.* +*.test.config.local.* + +# 测试数据库 +test.db +test.sqlite +test.sqlite3 +*_test.db + +# 测试日志 +test.log +tests.log +test_*.log +*_test.log + +# Mock 和 Stub 文件 +mocks/generated/ +stubs/generated/ +fixtures/generated/ + +# 测试缓存 +.pytest_cache/ +.cache/pytest/ +node_modules/.cache/jest/ \ No newline at end of file