mirror of
https://github.com/danbulant/docker-compose
synced 2026-07-04 10:50:41 +00:00
style: fix lint errors
This commit is contained in:
parent
46cb725156
commit
bf8210ae9b
3 changed files with 11 additions and 8 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "jest test --verbose",
|
"test": "jest test --verbose",
|
||||||
"eslint": "eslint src/**/*.ts test/**/*.ts",
|
"lint": "eslint src/**/*.ts test/**/*.ts",
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"prepublishOnly": "tsc",
|
"prepublishOnly": "tsc",
|
||||||
"release": "yarn build && standard-version"
|
"release": "yarn build && standard-version"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import childProcess from 'child_process'
|
import childProcess from 'child_process'
|
||||||
import { Readable } from 'stream'
|
|
||||||
export interface IDockerComposeOptions {
|
export interface IDockerComposeOptions {
|
||||||
cwd?: string
|
cwd?: string
|
||||||
config?: string | string[]
|
config?: string | string[]
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ test('ensure container gets started', async (): Promise<void> => {
|
||||||
test('ensure exit code is returned correctly', async (): Promise<void> => {
|
test('ensure exit code is returned correctly', async (): Promise<void> => {
|
||||||
let result = await compose.down({ cwd: path.join(__dirname), log: logOutput })
|
let result = await compose.down({ cwd: path.join(__dirname), log: logOutput })
|
||||||
|
|
||||||
await expect(result).toMatchObject({
|
expect(result).toMatchObject({
|
||||||
exitCode: 0
|
exitCode: 0
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -78,12 +78,17 @@ test('ensure exit code is returned correctly', async (): Promise<void> => {
|
||||||
expect(result).toMatchObject({
|
expect(result).toMatchObject({
|
||||||
exitCode: 0
|
exitCode: 0
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let failedResult = 0
|
||||||
try {
|
try {
|
||||||
await compose.logs('non_existent_service', { cwd: path.join(__dirname) })
|
await compose.logs('non_existent_service', {
|
||||||
expect(false).toBeTruthy()
|
cwd: path.join(__dirname)
|
||||||
} catch (rejectionResult) {
|
})
|
||||||
expect(rejectionResult.exitCode).toBe(1)
|
} catch (error) {
|
||||||
|
failedResult = error.exitCode
|
||||||
}
|
}
|
||||||
|
expect(failedResult).toBe(1)
|
||||||
|
|
||||||
await compose.down({ cwd: path.join(__dirname), log: logOutput })
|
await compose.down({ cwd: path.join(__dirname), log: logOutput })
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -291,7 +296,6 @@ test('ensure run and exec are working', async (): Promise<void> => {
|
||||||
const opts = { cwd: path.join(__dirname), log: logOutput }
|
const opts = { cwd: path.join(__dirname), log: logOutput }
|
||||||
|
|
||||||
await compose.upAll(opts)
|
await compose.upAll(opts)
|
||||||
const console = require('console')
|
|
||||||
expect(await isContainerRunning('/compose_test_web')).toBeTruthy()
|
expect(await isContainerRunning('/compose_test_web')).toBeTruthy()
|
||||||
|
|
||||||
let std = await compose.exec('web', 'cat /etc/os-release', opts)
|
let std = await compose.exec('web', 'cat /etc/os-release', opts)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue