将测试移动到闭源仓库
Move tests to closed source repo

原始链接: https://github.com/tldraw/tldraw/issues/8082

为了改进代码管理和安全性,tldraw的测试套件正在从公开的tldraw/tldraw仓库迁移到私有的、闭源仓库。这包括大量的测试集合——超过327个文件,涵盖了`tldraw`、`editor`、`store`和`sync-core`等多个包的单元测试、集成测试和端到端 (e2e) 测试。 此次迁移包含所有Vitest单元/集成测试、Playwright e2e测试(来自示例和dotcom应用)、相关的配置和测试工具。重要的是,闭源CI将被更新,以针对SDK包运行完整的测试套件。迁移完成后,所有测试文件都将被从开源仓库中删除,将测试整合到私有环境中。此举旨在更好地保护内部测试逻辑,并确保核心tldraw功能的全面测试。

Hacker News 上正在讨论 tldraw 将其测试移至闭源仓库。 最初报道为迁移*到*开源,后来澄清为从公共仓库迁移*到*私有仓库。 最初引发这一“问题”的是一个玩笑提交,被一些人误解为认真对待。 然而,讨论扩展到对“垃圾贡献”(通常为积累简历而做的低质量贡献)的担忧,以及维护开源项目的挑战。 一位评论者对 tldraw 的做法表示失望,建议采取替代的缓解策略,而不是完全关闭贡献。 另一些人则争论“开源”与“共享源代码”的定义,以及人工智能生成测试套件的可能性。 一个核心问题是,公开测试被移除导致公共利益的损失。
相关文章

原文

Move the test suite out of the open source tldraw/tldraw repo and into the closed source repo.

Context

The tldraw monorepo currently contains ~327 test files across unit, integration, and e2e tests:

  • packages/tldraw: ~148 unit/integration tests (shapes, tools, commands, UI)
  • packages/editor: ~41 unit/integration tests (geometry, managers, tools)
  • packages/store: ~27 unit tests (records, queries, migrations)
  • packages/utils: ~30 unit tests (array, cache, media, hashing)
  • packages/sync-core: ~20 unit/integration tests (room, storage, protocol)
  • packages/state: ~12 unit tests (atoms, computed, transactions)
  • packages/tlschema: ~9 unit tests (schema, migrations)
  • packages/validate: ~2 unit tests
  • packages/sync: ~2 unit tests
  • apps/examples/e2e: ~24 Playwright e2e tests
  • apps/dotcom/client/e2e: ~12 Playwright e2e tests

Scope

  • Move all vitest unit/integration tests
  • Move all Playwright e2e tests
  • Move test configuration (vitest configs, playwright configs, test setup files)
  • Move test utilities and helpers (e.g. TestEditor)
  • Ensure CI in the closed source repo runs the full test suite against the SDK packages
  • Remove test files from the open source repo
联系我们 contact @ memedata.com