style: fix lint errors

This commit is contained in:
Alexander Zeitler 2021-04-10 23:24:15 +02:00
parent 46cb725156
commit bf8210ae9b
3 changed files with 11 additions and 8 deletions

View file

@ -6,7 +6,7 @@
"types": "dist/index.d.ts",
"scripts": {
"test": "jest test --verbose",
"eslint": "eslint src/**/*.ts test/**/*.ts",
"lint": "eslint src/**/*.ts test/**/*.ts",
"build": "tsc",
"prepublishOnly": "tsc",
"release": "yarn build && standard-version"

View file

@ -1,5 +1,4 @@
import childProcess from 'child_process'
import { Readable } from 'stream'
export interface IDockerComposeOptions {
cwd?: string
config?: string | string[]

View file

@ -70,7 +70,7 @@ test('ensure container gets started', async (): Promise<void> => {
test('ensure exit code is returned correctly', async (): Promise<void> => {
let result = await compose.down({ cwd: path.join(__dirname), log: logOutput })
await expect(result).toMatchObject({
expect(result).toMatchObject({
exitCode: 0
})
@ -78,12 +78,17 @@ test('ensure exit code is returned correctly', async (): Promise<void> => {
expect(result).toMatchObject({
exitCode: 0
})
let failedResult = 0
try {
await compose.logs('non_existent_service', { cwd: path.join(__dirname) })
expect(false).toBeTruthy()
} catch (rejectionResult) {
expect(rejectionResult.exitCode).toBe(1)
await compose.logs('non_existent_service', {
cwd: path.join(__dirname)
})
} catch (error) {
failedResult = error.exitCode
}
expect(failedResult).toBe(1)
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 }
await compose.upAll(opts)
const console = require('console')
expect(await isContainerRunning('/compose_test_web')).toBeTruthy()
let std = await compose.exec('web', 'cat /etc/os-release', opts)