Skip to content

Commit

Permalink
refactor: rename result to data
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexZeitler committed Apr 14, 2021
1 parent aa26e83 commit 90421b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export type TypedDockerComposeResult<T> = {
exitCode: number | null
out: string
err: string
result: T
data: T
}

/**
Expand Down Expand Up @@ -367,7 +367,7 @@ export const port = async function (
const [address, port] = result.out.split(':')
return {
...result,
result: {
data: {
address,
port: Number(port)
}
Expand Down
4 changes: 2 additions & 2 deletions test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})

Expand Down

0 comments on commit 90421b7

Please sign in to comment.