Skip to content

Commit 76bd97f

Browse files
committed
test(unit): convert tests for the reusable-release-workflow version to vitest
for #458
1 parent 2705e8d commit 76bd97f

File tree

2 files changed

+19
-21
lines changed

2 files changed

+19
-21
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import {it, describe, expect} from 'vitest';
2+
import any from '@travi/any';
3+
4+
import {determineAppropriateWorkflow} from './reusable-release-workflow.js';
5+
6+
describe('reusable release workflow', () => {
7+
it('should use the latest semantic-release version for the lowest supported node version', async () => {
8+
expect(determineAppropriateWorkflow('18')).toEqual('form8ion/.github/.github/workflows/release-package.yml@master');
9+
});
10+
11+
it('should use the latest semantic-release version for a higher node version', async () => {
12+
expect(determineAppropriateWorkflow('20')).toEqual('form8ion/.github/.github/workflows/release-package.yml@master');
13+
});
14+
15+
it('should use semantic-release v19 for a lower node version', async () => {
16+
expect(determineAppropriateWorkflow(any.fromList(['14', '16', '17'])))
17+
.toEqual('form8ion/.github/.github/workflows/release-package-semantic-release-19.yml@master');
18+
});
19+
});

src/semantic-release/ci-providers/github-workflows/reusable-release-workflow-test.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)