+/**
+ * @file Tests for OCPP 2.0 certificate integration lifecycle
+ * @description Verifies certificate install, list, and delete operations end-to-end
+ */
+
import { expect } from '@std/expect'
import { afterEach, beforeEach, describe, it } from 'node:test'
+/**
+ * @file Tests for OCPP 2.0 integration (SetVariables → GetVariables consistency)
+ * @description Verifies that SetVariables and GetVariables produce consistent results
+ */
+
import { expect } from '@std/expect'
import { afterEach, beforeEach, describe, it } from 'node:test'
import _ajvFormats from 'ajv-formats'
import { readFileSync } from 'node:fs'
import { join } from 'node:path'
-import { describe, it } from 'node:test'
+import { afterEach, describe, it } from 'node:test'
import { fileURLToPath } from 'node:url'
+import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
+
const AjvConstructor = _Ajv.default
const ajvFormats = _ajvFormats.default
}
await describe('OCPP 2.0 schema validation — negative tests', async () => {
+ afterEach(() => {
+ standardCleanup()
+ })
+
await it('AJV compiles ResetRequest schema without error (strict:false required)', () => {
// Verifies the AJV configuration works for schemas using additionalItems pattern
expect(() => makeValidator('ResetRequest.json')).not.toThrow()
+/**
+ * @file Tests for OCPP20ServiceUtils.enforceMessageLimits
+ * @description Verifies message limit enforcement logic for OCPP 2.0 payloads
+ */
+
import { expect } from '@std/expect'
-import { describe, it } from 'node:test'
+import { afterEach, describe, it } from 'node:test'
import { OCPP20ServiceUtils } from '../../../../src/charging-station/ocpp/2.0/OCPP20ServiceUtils.js'
+import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js'
interface MockLogger {
debug: (...args: unknown[]) => void
}
await describe('OCPP20ServiceUtils.enforceMessageLimits', async () => {
+ afterEach(() => {
+ standardCleanup()
+ })
+
await describe('no limits configured (both 0)', async () => {
await it('should return rejected:false and empty results when both limits are 0', () => {
const station = makeMockStation()