From: Jérôme Benoit Date: Fri, 7 Jun 2024 16:15:30 +0000 (+0200) Subject: test: improve ConfigurationUtils coverage X-Git-Tag: v1.3.5~12 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=8598b5618e5acf6b9e2538faa5225ba51aa68d10;p=e-mobility-charging-stations-simulator.git test: improve ConfigurationUtils coverage Signed-off-by: Jérôme Benoit --- diff --git a/tests/utils/ConfigurationUtils.test.ts b/tests/utils/ConfigurationUtils.test.ts index a7eae639..b0689b88 100644 --- a/tests/utils/ConfigurationUtils.test.ts +++ b/tests/utils/ConfigurationUtils.test.ts @@ -4,9 +4,13 @@ import { describe, it } from 'node:test' import { expect } from 'expect' import { FileType } from '../../src/types/index.js' -import { handleFileException } from '../../src/utils/ConfigurationUtils.js' +import { handleFileException, logPrefix } from '../../src/utils/ConfigurationUtils.js' await describe('ConfigurationUtils test suite', async () => { + await it('Verify logPrefix()', () => { + expect(logPrefix()).toContain(' Simulator configuration |') + }) + await it('Verify handleFileException()', t => { t.mock.method(console, 'error') const error = new Error()