test(release): pin GITHUB_REF_NAME in main-rc releaseTag assertion

The bare releaseTag('rc') call defaulted to process.env.GITHUB_REF_NAME,
which on PR CI is the merge ref (e.g. 186/merge) and yields
'branch-186-merge' instead of 'next'. Pass an explicit { GITHUB_REF_NAME:
'main' } so the test exercises the main-rc path regardless of CI env.
This commit is contained in:
Andrey Avtomonov 2026-05-20 16:55:25 +02:00
parent c859a22fda
commit a4763f1be5

View file

@ -25,7 +25,7 @@ function pluginNames(config) {
describe('semantic-release config', () => {
it('configures rc releases as a prerelease on main', () => {
assert.equal(releaseKind({ KTX_RELEASE_KIND: 'rc' }), 'rc');
assert.equal(releaseTag('rc'), 'next');
assert.equal(releaseTag('rc', { GITHUB_REF_NAME: 'main' }), 'next');
assert.deepEqual(releaseBranches({ KTX_RELEASE_KIND: 'rc', GITHUB_REF_NAME: 'main' }), [
{ name: 'main', prerelease: 'rc', channel: 'next' },
]);