搜尋套件、儲存庫與 APP 分類

套件詳情v2.0.2

test_descriptor

用於定義和驗證檔案與目錄結構的 API。

AndroidiOSmacOSWindowsLinux
近 30 天下載
22.4萬
喜歡數
4
Pub 分數
160

安裝套件

flutter pub add test_descriptor

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

test_descriptor 是一個 Dart 套件,旨在簡化測試過程中建立與驗證檔案與目錄結構。它提供了一個乾淨、直覺的 API 來定義預期的檔案配置,讓設定測試範本與驗證檔案系統狀態變得更容易。非常適合涉及檔案作業的整合測試與端對端測試,能確保一致性並減少處理複雜目錄層次時的重複程式碼。此套件由 Dart 團隊維護,並與測試框架無縫整合。

適用情境

  • 測試檔案系統互動
  • 設定測試夾具
  • 驗證目錄結構
  • 驗證生成的檔案
  • 與檔案 I/O 的整合測試
  • 自動化測試設定

主要特色

  • 宣告式檔案結構定義
  • 內建驗證工具
  • 支援巢狀目錄
  • 易於閱讀與維護
  • 與 test 包相容
  • 跨平台相容性

適合對象

  • 單元測試和整合測試
  • 基於檔案的工具測試
  • 程式碼產生驗證
  • CI/CD 流水線測試
  • Dart 包開發
  • 測試夾具管理

使用建議

  • 需要依賴 test 包
  • 不適用於執行時間使用
  • 僅限測試環境使用
  • 如果過度使用,可能會增加測試套件的複雜性
  • 最佳搭配其他測試工具使用
  • 不直接處理檔案內容差異

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Dart CI OpenSSF Scorecard

What's here?

Welcome! package:test is the standard testing library for Dart and Flutter. If you have questions about Dart testing, please see the docs for package:test. package:test_api and package:test_core are implementation details and generally not user-facing.

package:checks is a relatively new library for expressing test expectations. It's a more modern version of package:matcher and features a literate API.

Packages

Package Description Issues Version
checks A framework for checking values against expectations and building custom expectations. issues pub package
fake_async Fake asynchronous events such as timers and microtasks for deterministic testing. issues pub package
matcher Support for specifying test expectations via an extensible Matcher class. Also includes a number of built-in Matcher implementations for common cases. issues pub package
test A full featured library for writing and running Dart tests across platforms. issues pub package
test_api The user facing API for structuring Dart tests and checking expectations. pub package
test_core A basic library for writing tests and running them on the VM. pub package
test_descriptor An API for defining and verifying files and directory structures. issues pub package
test_process Test processes: starting; validating stdout and stderr; checking exit code. issues pub package

所屬分類

依賴

依賴清單 5 項

原始碼儲存庫

使用此套件的專案