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