← Back to home
Skill

swift-protocol-di-testing

github · 2.2.3 · Downloads 259.5K · Heat 60.1

Source & License

Source: affaan-m/ECC
Author: affaan-m
License: MIT License

This site lists project metadata and a short summary only. We do not republish the author’s original content — follow the source link above for the full text. Verify the LICENSE and NOTICE in the original repository before commercial use.

Warning: no LICENSE/COPYING file was found in the upstream repository root. The license name above comes from a third-party registry and is unverified. Confirm with the source before commercial use.

Introduction

基于协议的依赖注入,用于可测试的Swift代码——使用聚焦协议和Swift Testing模拟文件系统、网络和外部API。

Resource Information

Author:affaan-m
Category:Dev Tools
Language:zh
Version:2.2.3
Auth: No auth
License:MIT
Pricing: Marked free
Publisher:affaan-m

License information is collected from official sources and may be outdated or missing. Refer to the LICENSE file in the original repository before commercial use.

Tags
代码 & 开发助手 / swift-protocol-di-testing

Features

  • 何时激活
  • 核心模式
  • 1. 定义小型、专注的协议
  • 2. 创建默认(生产)实现
  • 3. 创建用于测试的模拟实现
  • 4. 使用默认参数注入依赖项
  • 5. 使用 Swift Testing 编写测试
  • 最佳实践
Use cases
编写访问文件系统、网络或外部 API 的 Swift 代码时需要在未触发真实故障的情况下测试错误处理路径时构建需要在不同环境(应用、测试、SwiftUI 预览)中工作的模块时设计支持 Swift 并发(actor、Sendable)的可测试架构时单一职责:每个协议应处理一个关注点——不要创建包含许多方法的“上帝协议”Sendable 一致性:当协议跨 actor 边界使用时需要

Supported platforms

Claude Code

Information boundary

Information on this page is collected from official documents for technical presentation only and does not imply our endorsement. Pricing, quotas and availability are subject to the latest official statements. We make no commitment regarding any action you take after leaving this site.

Similar skills

软件专家.Skill

Not specified

软件专家.Skill P8级软件开发助手,软件开发与逆向专家:软件开发、复刻、API设计、Bug诊断、代码生成、代码审查、重构、测试用例、性能基准、技术选型、文档生成、任务拆解/Spec/Karpathy、MySQL/MariaDB、知识图谱、反编译/逆向(APK/DLL/pyc、脱壳与混淆还原、伪代码取证、恶意样本分析),以及工程纪律层(根因调试硬闭环、阶段导航、事故复盘/SLO、威胁建模/供应链、生产就绪/渐进发布、AI编码治理、Agent可读性、LLM应用安全)。支持 @标识 显式调用跳过路由。

dev-expert-pro

Not specified

编程专家 Pro:融合编程专家 2.0.3 工程专题与编程大神的鸿蒙 ArkTS/ArkUI、微信小程序和小游戏开发资料。用于项目实现、根因调试、审查、重构、测试、架构性能分析及多端开发验证。支持自然语言和 @专题标识,按任务读取包内知识;只问概念时直接回答。

编程大神.Skill

Not specified

【全栈能力】编程大神.Skill:面向复杂真实项目的高阶全栈编程助手。不止生成代码,而是从一句目标接手陌生代码库,拆解需求、补齐实现、追到根因、完成重构、联调前后端,并把结果推进到能运行、能验证、能交付。覆盖 Web、后端、脚本、iOS、安卓、鸿蒙 ArkUI、微信小程序及其他技术栈,支持中英文工程、疑难 Bug、跨模块任务和长任务续做;用构建、日志、真实入口、设备或接口证据说明结果。仅问概念时直接回答,要求落地时持续推进到验收或明确阻塞。

编程专家.Skill

API key required

编程专家.Skill P8级编程助手,完整闭环式 全栈编程专家:Java/Php网站/小程序/软件项目、API设计、Bug诊断、代码生成、代码审查、重构、测试用例、性能基准、技术选型、文档生成、任务拆解、Spec驱动、Karpathy规范、CMS二次开发、前端设计、MySQL/Mariadb、项目知识图谱,以及工程纪律层(根因调试硬闭环、阶段导航、事故复盘/SLO、威胁建模/供应链安全、生产就绪/渐进式发布、AI编码治理、面向Agent代码可读性、LLM应用安全)。支持 @标识 显式调用跳过路由。

编程专家.Skill

API key required

编程专家.Skill P8级编程助手,25年实战经验技能Skill,全栈:Java/Php网站/软件项目、API设计、Bug诊断、代码生成、代码审查、重构、测试用例、性能基准、技术选型、文档生成、任务拆解、Spec驱动、Karpathy规范、CMS二次开发、前端设计、MySQL/Mariadb、项目知识图谱,以及工程纪律层(根因调试硬闭环、阶段导航、事故复盘/SLO、威胁建模/供应链安全、生产就绪/渐进式发布、AI编码治理、面向Agent代码可读性、LLM应用安全)。支持 @标识 显式调用跳过路由。

Github

API key required

使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。

What is a Skill

A Skill is a packaged single capability, such as text recognition, document summarization, or keyword extraction. Developers wrap the calling logic and prompts into a plugin-like unit, so users can load it without understanding the underlying model. StackPilot indexes a large number of skills that can be tried instantly or assembled into a plan.