feat!: use "~> v2" as default

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker
2024-05-26 14:39:26 -03:00
parent 5742e2a039
commit fea4ca2b14
3 changed files with 27 additions and 5 deletions
+12 -1
View File
@@ -1,4 +1,4 @@
import {describe, expect, it} from '@jest/globals';
import { describe, expect, it } from '@jest/globals';
import * as fs from 'fs';
import * as goreleaser from '../src/goreleaser';
@@ -28,6 +28,17 @@ describe('install', () => {
expect(fs.existsSync(bin)).toBe(true);
}, 100000);
it('acquires latest v2 version of GoReleaser', async () => {
const bin = await goreleaser.install('goreleaser', '~> v2');
expect(fs.existsSync(bin)).toBe(true);
}, 100000);
it('acquires latest v2 version of GoReleaser Pro', async () => {
const bin = await goreleaser.install('goreleaser-pro', '~> v2');
expect(fs.existsSync(bin)).toBe(true);
}, 100000);
it('acquires latest version of GoReleaser Pro', async () => {
const bin = await goreleaser.install('goreleaser-pro', 'latest');
expect(fs.existsSync(bin)).toBe(true);