Some fixes to the live test suite (#32)
CI / Build and test (push) Canceled after 0s
Documentation / Build documentation (push) Canceled after 0s
Documentation / Deploy to GitHub Pages (push) Canceled after 0s
CI / Build and test (push) Canceled after 0s
Documentation / Build documentation (push) Canceled after 0s
Documentation / Deploy to GitHub Pages (push) Canceled after 0s
This PR contains the work done to fix the live test suite, which started failing once the Amiibo API began returning Switch 2 games, and tidies the test suite around it.
### Changes
- **Live tests:** replaced the assertion that the first amiibo has no Switch 2 games with a usage check, matching the other platforms. The live data now includes Switch 2 entries for most amiibos.
- **Live tests:** refreshed the minimum item counts and the earliest accepted last-updated date to the values observed in October 2026, and documented in the README how to refresh them.
- **All tests:** moved test descriptions from `@Test("...")` strings into backticked function names, and aligned every case on the same GIVEN/WHEN/THEN structure.
- **Live client:** replaced the TODO about DocC inherited docs with a note. The compiler does not inherit documentation for protocol witnesses, so the repeated doc comments stay on purpose.
Reviewed-on: #32
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
This commit was merged in pull request #32.
This commit is contained in:
1 parent
13b9c74a38
commit
4cbac015b1
8 files changed
+138
-134
No files matched your search
@@ -181,8 +181,8 @@ struct AmiiboServiceLiveTests {
|
||||
@Test
|
||||
func `get the last updated timestamp`() async throws {
|
||||
try await assertLastUpdated(
|
||||
onOrAfterDay: 24,
|
||||
month: 7,
|
||||
onOrAfterDay: 22,
|
||||
month: 10,
|
||||
year: 2026
|
||||
)
|
||||
}
|
||||
@@ -221,8 +221,7 @@ private extension AmiiboServiceLiveTests {
|
||||
|
||||
if filter.showUsage == true {
|
||||
#expect(firstAmiiboPlatform.switch.first?.usages?.isEmpty == false)
|
||||
// Given the live data is still not returning any Switch 2 games.
|
||||
#expect(firstAmiiboPlatform.switch2.isEmpty == true)
|
||||
#expect(firstAmiiboPlatform.switch2.first?.usages?.isEmpty == false)
|
||||
#expect(firstAmiiboPlatform.threeDS.first?.usages?.isEmpty == false)
|
||||
#expect(firstAmiiboPlatform.wiiU.first?.usages?.isEmpty == false)
|
||||
}
|
||||
@@ -584,16 +583,16 @@ enum Output {
|
||||
// MARK: - Constants
|
||||
|
||||
private extension Int {
|
||||
/// A number that represents the minimum number of amiibo items expected from the live service, as of July 2026.
|
||||
static let minimumAmiibos = 946
|
||||
/// A number that represents the minimum number of amiibo series expected from the live service, as of July 2026.
|
||||
static let minimumAmiiboSeries = 31
|
||||
/// A number that represents the minimum number of amiibo types expected from the live service, as of July 2026.
|
||||
/// A number that represents the minimum number of amiibo items expected from the live service, as of October 2026.
|
||||
static let minimumAmiibos = 952
|
||||
/// A number that represents the minimum number of amiibo series expected from the live service, as of October 2026.
|
||||
static let minimumAmiiboSeries = 32
|
||||
/// A number that represents the minimum number of amiibo types expected from the live service, as of October 2026.
|
||||
static let minimumAmiiboTypes = 5
|
||||
/// A number that represents the minimum number of game characters expected from the live service, as of July 2026.
|
||||
static let minimumGameCharacters = 681
|
||||
/// A number that represents the minimum number of game series expected from the live service, as of July 2026.
|
||||
static let minimumGameSeries = 118
|
||||
/// A number that represents the minimum number of game characters expected from the live service, as of October 2026.
|
||||
static let minimumGameCharacters = 685
|
||||
/// A number that represents the minimum number of game series expected from the live service, as of October 2026.
|
||||
static let minimumGameSeries = 119
|
||||
}
|
||||
|
||||
private extension String {
|
||||
|
||||
Reference in new issue
Block a user