Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn local test into actual test #145

Merged
merged 3 commits into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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