mirror of
https://github.com/danbulant/docker-compose
synced 2026-05-24 12:35:32 +00:00
refactor: rename result to data
This commit is contained in:
parent
aa26e83884
commit
90421b7eb2
2 changed files with 4 additions and 4 deletions
|
|
@ -36,7 +36,7 @@ export type TypedDockerComposeResult<T> = {
|
||||||
exitCode: number | null
|
exitCode: number | null
|
||||||
out: string
|
out: string
|
||||||
err: string
|
err: string
|
||||||
result: T
|
data: T
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -367,7 +367,7 @@ export const port = async function (
|
||||||
const [address, port] = result.out.split(':')
|
const [address, port] = result.out.split(':')
|
||||||
return {
|
return {
|
||||||
...result,
|
...result,
|
||||||
result: {
|
data: {
|
||||||
address,
|
address,
|
||||||
port: Number(port)
|
port: Number(port)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -372,8 +372,8 @@ test('build accepts config as string', async (): Promise<void> => {
|
||||||
await compose.upAll(config)
|
await compose.upAll(config)
|
||||||
const result = await compose.port('web', 8888, config)
|
const result = await compose.port('web', 8888, config)
|
||||||
|
|
||||||
expect(result.result.address).toBe('0.0.0.0')
|
expect(result.data.address).toBe('0.0.0.0')
|
||||||
expect(result.result.port).toBe(8888)
|
expect(result.data.port).toBe(8888)
|
||||||
await compose.down(config)
|
await compose.down(config)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue