跳转到主要内容
此内容尚未提供您的语言版本,正在以英文显示。

Dart Test Fundamentals

技能 已验证 活跃

Core concepts and best practices for `package:test`. Covers `test`, `group`, lifecycle methods (`setUp`, `tearDown`), and configuration (`dart_test.yaml`).

目的

To help developers understand and implement core concepts and best practices for writing effective tests in Dart projects.

功能

  • Explains `test` and `group` for test structure
  • Details lifecycle methods (`setUp`, `tearDown`, `setUpAll`, `tearDownAll`)
  • Guides on resource cleanup using `addTearDown`
  • Covers `dart_test.yaml` configuration for platforms, tags, and timeouts
  • Provides best practices for test naming and parameter placement

使用场景

  • Writing new test files for Dart projects
  • Structuring existing test suites with `group`
  • Configuring test execution behavior via `dart_test.yaml`
  • Understanding and applying test lifecycle methods for isolation

非目标

  • Does not provide specific test code generation
  • Does not cover test runners other than the standard Dart test runner
  • Does not provide in-depth coverage of specific assertion libraries (e.g., `package:checks` or `package:matcher` beyond their basic usage context)

Trust

  • info:Issues Attention17 issues opened and 27 closed in the last 90 days, indicating a reasonable level of maintainer engagement.

安装

npx skills add flutter/skills

通过 npx 运行 Vercel skills CLI(skills.sh)— 需要本地安装 Node.js,以及至少一个兼容 skills 的智能体(Claude Code、Cursor、Codex 等)。前提是仓库遵循 agentskills.io 格式。

质量评分

已验证
98 /100
1 day ago 分析

信任信号

最近提交2 days ago
星标1.9k
许可证BSD-3-Clause
状态
查看源代码