apple / apple/swift-argument-parser

Add product consisting of the test helpers target

Open
#255 2 comments 4 reactions 0 assignees View on GitHub
enhancement
Dominant language
Swift
Stars
3.8k
Forks
411
Avg merge
7d 13h
Merged PRs (30d)
17

Description

When writing a cli, the interface might be interesting enough to warrant tests of the parsing. In order to do that I had previously copied the test helpers from the argument parser project into mine. However recently I came back to such a project and saw my tests fail. After a too-long investigation it turned out that the particular function I copied had diverged from the source; copying the updated version fixed my tests.
If I had been able to import ArgumentParserTestHelpers from the start, I would not have had that problem.
Obviously not all of the current content of the target is desirable as public api, but the various functions that start with “Assert” are all obviously useful to users of the package for their own tests.

Contributor guide

Open the contributing guide

Research direction

Start by locating the ArgumentParserTestHelpers target and reviewing the existing Assert-prefixed helpers. Compare their current scope with the requested public API; done means CLI projects can import the target for their tests without copying these helpers.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
cli, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.