Skip to content

Commit

Permalink
Merge pull request #145 from Cyberbeni/package-resolved-parsing-test
Browse files Browse the repository at this point in the history
Turn local test into actual test
  • Loading branch information
Cyberbeni authored Oct 13, 2024
2 parents bfe30a6 + ab76bc8 commit 099d640
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
test('Local test', async() => {
const test = "test"
expect(test.length).toBe(4)
import { SwiftToolInstaller } from '../src/installer'

test('Test Package.resolved v3 parsing', async() => {
const installer = new SwiftToolInstaller("https://github.com/nicklockwood/SwiftFormat", "", "" , "", false)
const version = installer.parsePackageResolved()
expect(version).toBe("ab6844edb79a7b88dc6320e6cee0a0db7674dac3")
})
2 changes: 1 addition & 1 deletion src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class SwiftToolInstaller {
readonly version: string
readonly useCache: boolean

private constructor(url: string, commit: string, branch: string, version: string, useCache: boolean) {
constructor(url: string, commit: string, branch: string, version: string, useCache: boolean) {
this.url = url
this.commit = commit
this.branch = branch
Expand Down

0 comments on commit 099d640

Please sign in to comment.