我在生成模拟时面临以下问题SwiftyMocky
╔════════════════════════╗
║ SwiftyMocky CLI v3.5.0 ║
╚════════════════════════╝
Running at: <path-to-project>SomeProject
Processing mock: SomeTests ...
❌ Error: ShellOut encountered an error
Status code: 1
Message: "Unknown Arguments: <path>/.mocky/.config.yml.tmp
Options:
--watch [default: false] - Watch template for changes and regenerate as needed.
--disableCache [default: false] - Stops using cache.
--verbose [default: false] - Turn on verbose logging
--quiet [default: false] - Turn off any logging, only emmit errors.
--prune [default: false] - Remove empty generated files
--sources - Path to a source swift files. File or Directory.
--exclude-sources - Path to a source swift files to exclude. File or Directory.
--templates - Path to templates. File or Directory.
--exclude-templates - Path to templates to exclude. File or Directory.
--output - Path to output. File or Directory. Default is current path.
--config - Path to config file. File or Directory. Default is current path.
--force-parse - File extensions that Sourcery will be forced to parse, even if they were generated by Sourcery.
--args - Custom values to pass to templates.
--ejsPath - Path to EJS file for JavaScript templates."
Output: ""
我已经尝试sourcery
将版本更新到 0.18.0 并卸载两者sourcery
并SwiftyMocky
重新安装。
任何帮助,将不胜感激。
更新SwiftyMocky doctor
日志
✗ SwiftyMocky doctor
╔════════════════════════╗
║ SwiftyMocky CLI v3.5.0 ║
╚════════════════════════╝
1. Inspecting tools dependencies:
✅ Mint available
✅ Sourcery is available through Mint
2. Inspecting Mockfile:
✅ Mockfile exists
✅ Mockfile contains mocks definitions
3. Linting 'ServicingTests' mock:
✅ Output file exists
Targets:
✅ Mock defines targets correctly
✅ All targets include
'./<project>/ServicingTests/ServicingTests.Mock.generated.swift' file.
Sources:
✅ Sources are defined correctly
Imports:
✅ Testable imports are defined
✅ Imports are defined
此外,我的一位同事能够生成模拟。他说当他运行SwiftyMocky generate
命令时它不会生成<path>/.mocky/.config.yml.tmp
.
唯一的区别是macOS
版本。我在跑10.15.4
,他在跑10.15.3
。