test: add ConfigurationUtils test
[e-mobility-charging-stations-simulator.git] / tests / utils / ConfigurationUtils.test.ts
CommitLineData
2a9305b5
JB
1import { describe, it } from 'node:test'
2
3import { expect } from 'expect'
4
5import { FileType } from '../../src/types/index.js'
6import { handleFileException } from '../../src/utils/ConfigurationUtils.js'
7
8await describe('ConfigurationUtils test suite', async () => {
9 await it('Verify handleFileException()', () => {
10 const error = new Error()
11 error.code = 'ENOENT'
12 expect(() => {
13 handleFileException('path/to/module.js', FileType.Authorization, error, 'log prefix')
14 }).toThrow(error)
15 })
16})