mirror of
https://github.com/docker/build-push-action.git
synced 2025-04-20 10:26:44 +00:00
simplified argument collection
Signed-off-by: Phred <fearphage@gmail.com>
This commit is contained in:
parent
4222161e3e
commit
af4fd4efb5
2 changed files with 33 additions and 21 deletions
|
@ -636,6 +636,19 @@ describe('asyncForEach', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('flagMap', () => {
|
||||
it('should prepend array elements with the provided flag', async () => {
|
||||
const testValues = ['a', 'b', 'c'];
|
||||
const results: string[][] = context.flagMap(testValues, '--catpants');
|
||||
|
||||
expect(results).toEqual([
|
||||
['--catpants', 'a'],
|
||||
['--catpants', 'b'],
|
||||
['--catpants', 'c'],
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('setOutput', () => {
|
||||
beforeEach(() => {
|
||||
process.stdout.write = jest.fn();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue