Skip to content

Commit

Permalink
Experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
mkurz committed Feb 1, 2022
1 parent 860cb31 commit f78b081
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2046,7 +2046,7 @@ describe('release-drafter', () => {
})
})

const overridesTest = async (overrides, expectedBody) => {
const overridesTest = (overrides, expectedBody) => {
let mockEnvironment = {}

/*
Expand Down Expand Up @@ -2122,7 +2122,7 @@ describe('release-drafter', () => {
// Method with all the test's logic, to prevent duplication

describe('with just the version', () => {
it('forces the version on templates', async () => {
it('forces the version on templates', () => {
return overridesTest(
{ version: '2.1.1' },
{
Expand All @@ -2136,7 +2136,7 @@ describe('release-drafter', () => {
})

describe('with just the tag', () => {
it('gets the version from the tag and forces using the tag', async () => {
it('gets the version from the tag and forces using the tag', () => {
return overridesTest(
{ tag: 'v2.1.1-alpha' },
{
Expand All @@ -2149,20 +2149,21 @@ 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 () => {
it('gets the version from the tag, expands variables in it and forces using the tag', () => {
return overridesTest(
{ tag: 'v2.1.1-alpha' },
{ 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.1.1-alpha',
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 Down

0 comments on commit f78b081

Please sign in to comment.