Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/delete-packages-and-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ on:
description: 'Tag to delete'
required: true
type: string
secrets:
GITHUB_TOKEN:
required: true
workflow_dispatch:
inputs:
tag:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ jobs:
packages: write # For publishing packages
uses: Checkmarx/ast-cli-javascript-wrapper/.github/workflows/release.yml@abe950ede3b052dfc236f730cf11cc290af53d1c
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ECHO_LIBRARIES_ACCESS_KEY: ${{ secrets.ECHO_LIBRARIES_ACCESS_KEY }}
4 changes: 0 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ on:
default: true
type: boolean
secrets:
GITHUB_TOKEN:
required: true
ECHO_LIBRARIES_ACCESS_KEY:
required: true
workflow_dispatch:
Expand Down Expand Up @@ -65,8 +63,6 @@ jobs:
uses: Checkmarx/ast-cli-javascript-wrapper/.github/workflows/delete-packages-and-releases.yml@abe950ede3b052dfc236f730cf11cc290af53d1c
with:
tag: ${{ inputs.jsTag }}
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: inputs.dev == true
release:
name: Release JavaScript Wrapper
Expand Down
26 changes: 26 additions & 0 deletions src/tests/LoggerConfigTest.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { getLoggerWithFilePath, logger } from '../main/wrapper/loggerConfig';
import * as fs from 'fs';
import * as path from 'path';

describe('Logger Configuration', () => {
it('should initialize logger with file path', () => {
const tempDir = path.join(__dirname, '../../tmp');
if (!fs.existsSync(tempDir)) {
fs.mkdirSync(tempDir, { recursive: true });
}

const logFilePath = path.join(tempDir, 'test.log');

// This should call configurationWithFile and cover line 4
getLoggerWithFilePath(logFilePath);

expect(logger).toBeDefined();
});

it('should initialize logger without file path', () => {
// This should call configurationWithoutFile
getLoggerWithFilePath();

expect(logger).toBeDefined();
});
});
Loading