mirror of
https://github.com/supabase/setup-cli.git
synced 2026-02-09 11:51:41 +00:00
feat: support downloading the latest version automatically (#70)
This commit is contained in:
@@ -6,12 +6,19 @@ import * as path from 'path'
|
||||
import {expect, test} from '@jest/globals'
|
||||
|
||||
test('gets download url to binary', async () => {
|
||||
const url = getDownloadUrl('0.1.0')
|
||||
const url = await getDownloadUrl('0.1.0')
|
||||
expect(url).toContain(
|
||||
'https://github.com/supabase/cli/releases/download/v0.1.0/'
|
||||
)
|
||||
})
|
||||
|
||||
test('gets download url to binary with "latest" version', async () => {
|
||||
const url = await getDownloadUrl('latest')
|
||||
expect(url).toMatch(
|
||||
/^https:\/\/github.com\/supabase\/cli\/releases\/download\/v[0-9]+\.[0-9]+\.[0-9]+\/supabase_[0-9]+\.[0-9]+\.[0-9]+/
|
||||
)
|
||||
})
|
||||
|
||||
// shows how the runner will run a javascript action with env / stdout protocol
|
||||
test('test runs', () => {
|
||||
process.env['RUNNER_TEMP'] = os.tmpdir()
|
||||
|
||||
Reference in New Issue
Block a user