1 /* eslint-disable @typescript-eslint/no-unsafe-member-access */
2 import { describe
, it
} from
'node:test'
4 import { expect
} from
'expect'
6 import { FileType
} from
'../../src/types/index.js'
7 import { handleFileException
, logPrefix
} from
'../../src/utils/ConfigurationUtils.js'
9 await describe('ConfigurationUtils test suite', async () => {
10 await it('Verify logPrefix()', () => {
11 expect(logPrefix()).toContain(' Simulator configuration |')
14 await it('Verify handleFileException()', t
=> {
15 t
.mock
.method(console
, 'error')
16 const error
= new Error()
19 handleFileException('path/to/module.js', FileType
.Authorization
, error
, 'log prefix |')
21 expect(console
.error
.mock
.calls
.length
).toBe(1)