Skip to content

Commit

Permalink
refactor: add documentation and test
Browse files Browse the repository at this point in the history
  • Loading branch information
gulivero1773 committed Jan 30, 2024
1 parent eb64be9 commit 10f5a44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import Vapor

/// Service that provides app health check functionality
public struct AppHealthChecks {
private let logger = Logger(label: "AppHealthChecks")

Expand Down
5 changes: 5 additions & 0 deletions Tests/AppHealthChecksTests/AppHealthChecksTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,9 @@ final class AppHealthChecksTests: XCTestCase {
let version = AppHealthChecks().getMajorVersion(from: "1.0.0")
XCTAssertEqual(version, 1)
}

func testGetMajorVersionForDefaultVersion() throws {
let version = AppHealthChecks().getMajorVersion(from: "1-0-0")
XCTAssertEqual(version, 0)
}
}

0 comments on commit 10f5a44

Please sign in to comment.