fix some nits to be consistent across actions

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2026-02-28 14:43:00 +01:00
parent 2fe291b767
commit 5cff5dd8b8
No known key found for this signature in database
GPG key ID: ADE44D8C9D44FBE4
5 changed files with 29 additions and 39 deletions

View file

@ -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

View file

@ -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,