mirror of
https://github.com/docker/setup-compose-action.git
synced 2026-04-12 00:40:05 +00:00
fix some nits to be consistent across actions
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
parent
2fe291b767
commit
5cff5dd8b8
5 changed files with 29 additions and 39 deletions
|
|
@ -32,7 +32,7 @@ describe('getInputs', () => {
|
|||
});
|
||||
|
||||
// prettier-ignore
|
||||
test.each([
|
||||
const cases: [number, Map<string, string>, context.Inputs][] = [
|
||||
[
|
||||
0,
|
||||
new Map<string, string>([
|
||||
|
|
@ -41,7 +41,7 @@ describe('getInputs', () => {
|
|||
{
|
||||
version: '',
|
||||
cacheBinary: true,
|
||||
} as context.Inputs
|
||||
}
|
||||
],
|
||||
[
|
||||
1,
|
||||
|
|
@ -52,18 +52,16 @@ describe('getInputs', () => {
|
|||
{
|
||||
version: 'v2.32.4',
|
||||
cacheBinary: false
|
||||
} as context.Inputs
|
||||
}
|
||||
]
|
||||
])(
|
||||
'[%d] given %p as inputs, returns %p',
|
||||
async (num: number, inputs: Map<string, string>, expected: context.Inputs) => {
|
||||
inputs.forEach((value: string, name: string) => {
|
||||
setInput(name, value);
|
||||
});
|
||||
const res = await context.getInputs();
|
||||
expect(res).toEqual(expected);
|
||||
}
|
||||
);
|
||||
];
|
||||
test.each(cases)('[%d] given %o as inputs, returns %o', async (num: number, inputs: Map<string, string>, expected: context.Inputs) => {
|
||||
inputs.forEach((value: string, name: string) => {
|
||||
setInput(name, value);
|
||||
});
|
||||
const res = await context.getInputs();
|
||||
expect(res).toEqual(expected);
|
||||
});
|
||||
});
|
||||
|
||||
// See: https://github.com/actions/toolkit/blob/master/packages/core/src/core.ts#L67
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import fs from 'node:fs';
|
|||
import os from 'node:os';
|
||||
import path from 'node:path';
|
||||
|
||||
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-actions-toolkit-'));
|
||||
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-setup-compose-action-'));
|
||||
|
||||
process.env = Object.assign({}, process.env, {
|
||||
TEMP: tmpDir,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue