Skip to content

Commit

Permalink
Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mkurz committed Feb 1, 2022
1 parent b285009 commit 6a16a69
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions test/index.test.js
Expand Up @@ -2149,6 +2149,20 @@ describe('release-drafter', () => {
})
})

describe('with just the tag containing variables', () => {
it('gets the version from the tag, expands variables in it and forces using the tag', async () => {
return overridesTest(
{ tag: 'v$RESOLVED_VERSION-beta' },
{
body: `Placeholder with example. Automatically calculated values based on previous releases are next major=3.0.0, minor=2.1.0, patch=2.0.1. Manual input version is 2.1.1.`,
draft: true,
name: 'v2.1.1 (Code name: Placeholder)',
tag_name: 'v2.0.1-beta',
}
)
})
})

describe('with just the name', () => {
it('gets the version from the name and forces using the name', async () => {
return overridesTest(
Expand All @@ -2163,6 +2177,20 @@ describe('release-drafter', () => {
})
})

describe('with just the name containing variables', () => {
it('gets the version from the name, expands variables in it and forces using the name', async () => {
return overridesTest(
{ name: 'v$RESOLVED_VERSION-beta (Code name: Foxtrot Unicorn)' },
{
body: `Placeholder with example. Automatically calculated values based on previous releases are next major=3.0.0, minor=2.1.0, patch=2.0.1. Manual input version is 2.1.1.`,
draft: true,
name: 'v2.0.1-beta (Code name: Foxtrot Unicorn)',
tag_name: 'v2.1.1',
}
)
})
})

describe('with publish: true', () => {
it('immediately publishes the created draft', async () => {
return overridesTest(
Expand Down

0 comments on commit 6a16a69

Please sign in to comment.