Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink committed Jan 31, 2024
1 parent 3540042 commit bb20f21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion extension/src/flow-cli/flow-version-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,3 @@ export class FlowVersionProvider {
export function parseFlowCliVersion (buffer: Buffer | string): string {
return (buffer.toString().split('\n')[0]).split(' ')[1]
}

6 changes: 3 additions & 3 deletions extension/test/unit/parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ suite('Parsing Unit Tests', () => {
})

test('FLow CLI Version Parsing string', async () => {
let versionTest: string = 'Version: v0.1.0\nCommit: 0a1b2c3d'
let formatted = parseFlowCliVersion(versionTest)
const versionTest: string = 'Version: v0.1.0\nCommit: 0a1b2c3d'
const formatted = parseFlowCliVersion(versionTest)
ASSERT_EQUAL(formatted, 'v0.1.0')
})

test('Flow CLI Version Parsing Integration', async () => {
// Check that version is parsed from currently installed flow-cli
const {stdout} = await execDefault('flow version')
const { stdout } = await execDefault('flow version')
const formatted = parseFlowCliVersion(stdout)
assert(semver.valid(formatted))
})
Expand Down

0 comments on commit bb20f21

Please sign in to comment.