forked from nodejs/node-core-utils
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow opt-out of Fixes/Refs metadata (nodejs#474)
* fix: allow opt-out of Fixes/Refs metadata * Add metadata gen test
- Loading branch information
1 parent
4b32ebc
commit df5c572
Showing
5 changed files
with
37 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,12 @@ Backport-PR-URL: https://github.com/nodejs/node/pull/30072 | |
Fixes: https://github.com/nodejs/build/issues/1961 | ||
Refs: https://github.com/nodejs/node/commit/53ca0b9ae145c430842bf78e553e3b6cbd2823aa#commitcomment-35494896 | ||
`; | ||
const skipRefsExpected = `PR-URL: https://github.com/nodejs/node/pull/16438 | ||
Reviewed-By: Foo User <[email protected]> | ||
Reviewed-By: Quux User <[email protected]> | ||
Reviewed-By: Baz User <[email protected]> | ||
Reviewed-By: Bar User <[email protected]> | ||
`; | ||
|
||
describe('MetadataGenerator', () => { | ||
it('should generate metadata properly', () => { | ||
|
@@ -68,4 +74,10 @@ describe('MetadataGenerator', () => { | |
const backportResults = new MetadataGenerator(backportData).getMetadata(); | ||
assert.strictEqual(backportExpected, backportResults); | ||
}); | ||
|
||
it('should skip adding Fixes/Refs metadata when --skipRefs is passed', () => { | ||
const data = { skipRefs: true, ...crossData }; | ||
const backportResults = new MetadataGenerator(data).getMetadata(); | ||
assert.strictEqual(skipRefsExpected, backportResults); | ||
}); | ||
}); |