- clear categories in tests as we run in the same process multiple times

This commit is contained in:
Mike Penz
2024-03-01 19:23:22 +00:00
committed by GitHub
parent eaf255d3da
commit 39d8ac4b4f
12 changed files with 146 additions and 69 deletions
+6 -1
View File
@@ -16,6 +16,11 @@ import {ReleaseNotesOptions} from './releaseNotesBuilder'
import {matchesRules} from './regexUtils'
const EMPTY_MAP = new Map<string, string>()
let CLEAR = false
export function clear(): void {
CLEAR = true
}
export interface PullRequestData extends PullRequestInfo {
childPrs?: PullRequestInfo[]
@@ -146,7 +151,7 @@ export function buildChangelog(diffInfo: DiffInfo, origPrs: PullRequestInfo[], o
// set-up the category object
for (const category of flatCategories) {
if (!category.entries) {
if (CLEAR || !category.entries) {
category.entries = []
}
}