mirror of
https://github.com/danbulant/docker-compose
synced 2026-05-20 04:48:36 +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
|
||||
out: string
|
||||
err: string
|
||||
result: T
|
||||
data: T
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -367,7 +367,7 @@ export const port = async function (
|
|||
const [address, port] = result.out.split(':')
|
||||
return {
|
||||
...result,
|
||||
result: {
|
||||
data: {
|
||||
address,
|
||||
port: Number(port)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -372,8 +372,8 @@ test('build accepts config as string', async (): Promise<void> => {
|
|||
await compose.upAll(config)
|
||||
const result = await compose.port('web', 8888, config)
|
||||
|
||||
expect(result.result.address).toBe('0.0.0.0')
|
||||
expect(result.result.port).toBe(8888)
|
||||
expect(result.data.address).toBe('0.0.0.0')
|
||||
expect(result.data.port).toBe(8888)
|
||||
await compose.down(config)
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue