},
"testExplorer.useNativeTesting": true,
"mochaExplorer.files": ["test/**/*Test.ts"],
- "mochaExplorer.debuggerConfig": "Debug Simulator Unit Tests"
+ "mochaExplorer.debuggerConfig": "Debug Simulator Unit Tests",
+ "cSpell.words": ["CSMS", "iccid", "imsi", "Measurand", "Mikro", "ocpp", "poolifier"]
}
import type { Configuration } from '@mikro-orm/core';
-export type MikroORMDBType = keyof typeof Configuration.PLATFORMS;
+export type MikroOrmDbType = keyof typeof Configuration.PLATFORMS;
export enum StorageType {
JSON_FILE = 'jsonfile',
MeterValueUnit,
type MeterValuesRequest,
type MeterValuesResponse,
- type MikroORMDBType,
+ type MikroOrmDbType as MikroORMDBType,
OCPP16AuthorizationStatus,
type OCPP16AuthorizeRequest,
type OCPP16AuthorizeResponse,
messageHandler: WorkerConstants.EMPTY_FUNCTION,
}
) {
- if (!workerScript) {
+ if (workerScript === null || workerScript === undefined) {
throw new Error('Worker script is not defined');
}
+ if (typeof workerScript === 'string' && workerScript.trim().length === 0) {
+ throw new Error('Worker script is empty');
+ }
if (!fs.existsSync(workerScript)) {
throw new Error('Worker script file does not exist');
}