zukeUnit function

void zukeUnit(
  1. FutureOr body(), {
  2. required ZukeScenarioContract scenario,
  3. String? description,
  4. Set<ControlId> provedControls = const {},
  5. Iterable<String> provedImplementationSlots = const ['primary'],
  6. String? caseId,
  7. String? testOn,
  8. Timeout? timeout,
  9. Object? skip,
  10. Object? tags,
  11. Map<String, dynamic>? onPlatform,
  12. int? retry,
})

Registers a unit-oriented managed test with the stable Zuke defaults.

Unit tests are recorded as unit evidence, use the scenario ID as their default case identity, and prove the primary implementation slot. Pass a caseId when one scenario has several independent unit cases.

Implementation

void zukeUnit(
  FutureOr<dynamic> Function() body, {
  required ZukeScenarioContract scenario,
  String? description,
  Set<ControlId> provedControls = const {},
  Iterable<String> provedImplementationSlots = const ['primary'],
  String? caseId,
  String? testOn,
  test_api.Timeout? timeout,
  Object? skip,
  Object? tags,
  Map<String, dynamic>? onPlatform,
  int? retry,
}) {
  zukeTest(
    body,
    scenario: scenario,
    description: description,
    evidenceTypes: const ['unit'],
    provedControls: provedControls,
    provedImplementationSlots: provedImplementationSlots,
    caseId: caseId ?? scenario.id.value,
    testOn: testOn,
    timeout: timeout,
    skip: skip,
    tags: tags,
    onPlatform: onPlatform,
    retry: retry,
  );
}