-
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v2.15.2: Remove tokens from JSON output.
- Loading branch information
1 parent
5cfbbb7
commit 0dde6ed
Showing
6 changed files
with
38 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const buildJsonOutput = require('../buildJsonOutput'); | ||
|
||
describe('Interactors | .alreadyPublished', () => { | ||
const params = { | ||
githubToken: 'GITHUB_TOKEN', | ||
personalToken: 'PERSONAL_TOKEN', | ||
reviewers: 'REVIEWERS', | ||
foo: 'BAR', | ||
}; | ||
|
||
it('removes tokens', () => { | ||
const results = buildJsonOutput(params); | ||
expect(results).not.toHaveProperty('githubToken'); | ||
expect(results).not.toHaveProperty('personalToken'); | ||
}); | ||
|
||
it('keeps the other properties', () => { | ||
const results = buildJsonOutput(params); | ||
const { githubToken, personalToken, ...other } = params; | ||
expect(results).toEqual(expect.objectContaining({ | ||
...other, | ||
})); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = (params) => { | ||
const { githubToken, personalToken, ...other } = params; | ||
return other; | ||
}; |
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