From f4fbfbae80bd1ac8d63c6cda1f188f9954c2c5e9 Mon Sep 17 00:00:00 2001 From: Maneesh Tewani Date: Fri, 10 Jan 2025 16:09:19 -0800 Subject: [PATCH] Updated formatting --- .../emulator-testing/emulators/emulator.ts | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/scripts/emulator-testing/emulators/emulator.ts b/scripts/emulator-testing/emulators/emulator.ts index 923a732d5ad..005e4c32418 100644 --- a/scripts/emulator-testing/emulators/emulator.ts +++ b/scripts/emulator-testing/emulators/emulator.ts @@ -125,16 +125,17 @@ export abstract class Emulator { findDataConnectConfigDir() { let path = './'; - const files = fs.readdirSync(path); - console.log(files); - if(files.includes('dataconnect')) { - return path + 'dataconnect'; - } - if(files.includes('test')) { - return path + 'test/dataconnect'; - } - throw new Error('Max Depth Exceeded. Please run from the data-connect/test folder'); - + const files = fs.readdirSync(path); + console.log(files); + if (files.includes('dataconnect')) { + return path + 'dataconnect'; + } + if (files.includes('test')) { + return path + 'test/dataconnect'; + } + throw new Error( + 'Max Depth Exceeded. Please run from the data-connect/test folder' + ); } setUp(): Promise { @@ -145,16 +146,18 @@ export abstract class Emulator { let promise: ChildProcessPromise; if (this.isDataConnect) { const dataConnectConfigDir = this.findDataConnectConfigDir(); - const password = process.env['POSTGRES_PASSWORD'] + const password = process.env['POSTGRES_PASSWORD']; promise = spawn(this.binaryPath, [ '--v=2', 'dev', `--listen=127.0.0.1:${this.port},[::1]:${this.port}`, `--local_connection_string=postgresql://postgres:${password}@localhost:5432/dataconnect-integration?sslmode=disable`, - `--config_dir=${dataConnectConfigDir}`, + `--config_dir=${dataConnectConfigDir}` ]); promise.childProcess.stdout?.on('data', console.log); - promise.childProcess.stderr?.on('data', res => console.log(res.toString())); + promise.childProcess.stderr?.on('data', res => + console.log(res.toString()) + ); } else { promise = spawn( 'java',