jest adaptations
MODIFY
package.json
package.json
"import-sort": "npx import-sort-cli --write 'src/**/*.ts{,x}' 'test/**/*.ts{,x}' 'types/**/*.ts{,x}'",
"test": "npm version && cross-env TS_NODE_FILES=true jest --config='test/jest.config.ts' --reporters='default' --reporters='./JestEvseReporter.js' --runInBand --logHeapUsage --verbose --colors --silent --forceExit --testPathIgnorePatterns='.*Runner.ts$'",
"test:createContext": "npm version && cross-env TS_NODE_FILES=true jest --config='test/jest.config.ts' --runInBand --logHeapUsage --verbose --colors --silent --forceExit -- test/**/**/ContextBuilderRunner.ts",
+ "test:create:utbilling": "npm version && cross-env TS_NODE_FILES=true TENANT_FILTER=utbilling jest --config='test/jest.config.ts' --runInBand --logHeapUsage --verbose --colors --silent --forceExit -- test/**/**/ContextBuilderRunner.ts",
"test:asset": "npm version && cross-env TS_NODE_FILES=true jest --config='./test/jest.config.ts' --runInBand --logHeapUsage --verbose --colors --silent -- test/**/AssetTest.ts",
"test:authentication": "npm version && cross-env TS_NODE_FILES=true jest --config='./test/jest.config.ts' --runInBand --logHeapUsage --verbose --colors --silent -- test/**/AuthenticationTest.ts",
"test:billing": "npm version && cross-env TS_NODE_FILES=true jest --config='./test/jest.config.ts' --runInBand --logHeapUsage --verbose --colors --silent -- test/**/BillingTest.ts",

MODIFY
test/api/BillingTest.ts
test/api/BillingTest.ts
/* eslint-disable max-len */
import { BillingChargeInvoiceAction, BillingInvoiceStatus } from '../../src/types/Billing';
import { BillingSettings, BillingSettingsType } from '../../src/types/Setting';
-import FeatureToggles, { Feature } from '../../src/utils/FeatureToggles';
-import chai, { assert, expect } from 'chai';
+import chai, { expect } from 'chai';
import BillingTestHelper from './BillingTestHelper';
import CentralServerService from './client/CentralServerService';
@@ -15,6 +14,7 @@ import { StatusCodes } from 'http-status-codes';
import StripeTestHelper from './StripeTestHelper';
import TestConstants from './client/utils/TestConstants';
import User from '../../src/types/User';
+import assert from 'assert';
import chaiSubset from 'chai-subset';
import config from '../config';
import global from '../../src/types/GlobalType';

MODIFY
test/api/BillingTestHelper.ts
test/api/BillingTestHelper.ts
@@ -5,7 +5,7 @@ import { BillingSettings, BillingSettingsType, SettingDB } from '../../src/types
import { ChargePointErrorCode, ChargePointStatus, OCPPStatusNotificationRequest } from '../../src/types/ocpp/OCPPServer';
import ChargingStation, { ConnectorType } from '../../src/types/ChargingStation';
import PricingDefinition, { DayOfWeek, PricingDimension, PricingDimensions, PricingEntity, PricingRestriction } from '../../src/types/Pricing';
-import chai, { assert, expect } from 'chai';
+import chai, { expect } from 'chai';
import AsyncTaskStorage from '../../src/storage/mongodb/AsyncTaskStorage';
import CentralServerService from './client/CentralServerService';
@@ -31,6 +31,7 @@ import { TransactionAction } from '../../src/types/Transaction';
import TransactionStorage from '../../src/storage/mongodb/TransactionStorage';
import User from '../../src/types/User';
import Utils from '../../src/utils/Utils';
+import assert from 'assert';
import chaiSubset from 'chai-subset';
import config from '../config';
import moment from 'moment';

jest adaptations