Remove mocha endpoint
Remove mocha from package.json
Run jest in github
MODIFY
.github/workflows/unit-tests.yml
.github/workflows/unit-tests.yml
@@ -48,7 +48,7 @@ jobs:
run: |
if [ ! -d test/config ]; then mkdir -p test/config; fi
cp src/assets/configs-ci/local.json test/config
- npm run mochatest:createContext
+ npm run test:createContext
- name: Run Integration Tests
- run: npm run mochatest
+ run: npm run test

MODIFY
package.json
package.json
"eslint": "cross-env TIMING=1 eslint --ext .js,.ts types src test",
"eslint:fix": "cross-env TIMING=1 eslint --ext .js,.ts --fix types src test",
"autocannon": "autocannon",
- "mochatest:createContext": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/ContextBuilderRunner.ts",
- "mochatest": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/*Test.ts",
- "mochatest:parallel": "npm version && cross-env TS_NODE_FILES=true mocha --parallel test/**/*Test.ts",
- "mochatest:nyc": "npm version && cross-env TS_NODE_FILES=true nyc mocha --no-parallel test/**/*Test.ts",
- "mochatest:nyc:parallel": "npm version && cross-env TS_NODE_FILES=true nyc mocha --parallel test/**/*Test.ts",
- "mochatest:chargingStation": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/OCPP*Test.ts",
- "mochatest:ocpi": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/OCPI*Test.ts",
- "mochatest:tenant": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/*TenantTest.ts",
- "mochatest:org": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/*OrgTest.ts",
- "mochatest:setting": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/*SettingTest.ts",
- "mochatest:user": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/UserTest.ts",
- "mochatest:siteorg": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/SiteOrgTest.ts",
- "mochatest:siteareaorg": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/SiteAreaOrgTest.ts",
- "mochatest:transaction": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/TransactionTest.ts",
- "mochatest:stat": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/StatisticsTest.ts",
- "mochatest:auth": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/AuthenticationTest.ts",
- "mochatest:ocpp": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/OCPP*Test.ts",
- "mochatest:authentication": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/AuthenticationTest.ts",
- "mochatest:crypto": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/EncryptionSettingTest.ts",
- "mochatest:filter": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/FilterTest.ts",
- "mochatest:tenantsetting": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/ComponentActivationTenantTest.ts",
- "mochatest:billing": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/BillingTest.ts",
- "mochatest:stripe": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/BillingStripeIntegrationTest.ts",
- "mochatest:asset": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/AssetTest.ts",
- "mochatest:car": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/CarTest.ts",
- "mochatest:tag": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/TagTest.ts",
- "mochatest:locking": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/LockingTest.ts",
- "mochatest:firmwareUpdateStatus": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/FirmwareUpdateStatusTest.ts",
- "mochatest:smartCharging": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/SmartChargingTest.ts",
- "mochatest:security": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/SecurityTest.ts",
- "mochatest:registrationToken": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/RegistrationTokenTest.ts",
- "mochatest:company": "npm version && cross-env TS_NODE_FILES=true mocha --no-parallel test/**/CompanyOrgTest.ts",
- "mochatest:create:utbilling": "npm version && cross-env TS_NODE_FILES=true TENANT_FILTER=utbilling mocha --no-parallel test/**/ContextBuilderRunner.ts",
"coverage": "nyc report --reporter=lcov",
"coverage:html": "nyc report --reporter=html",
"clinic:clean": "clinic clean",
"xmake:download-node-headers": "wget https://nexus.wdf.sap.corp:8443/nexus/service/local/repositories/3rd-party.releases.manual-uploads.hosted/content/org/nodejs/download/node/node-headers/14.15.4/node-headers-14.15.4.tar.gz -P ${WORKSPACE}/gen/tmp/",
"xmake:download-libvibs-headers": "wget https://nexus.wdf.sap.corp:8443/nexus/service/local/repositories/3rd-party.releases.manual-uploads.hosted/content/lovell/sharp/libvips/8.10.6/libvips-8.10.6-linux-x64.tar.br -P ${WORKSPACE}/gen/tmp/libvips/v8.10.6/",
-
"test": "npm version && cross-env TS_NODE_FILES=true jest --runInBand --forceExit test/**/*Test.ts",
"test:createContext": "npm version && cross-env TS_NODE_FILES=true jest --runInBand --forceExit ContextBuilderRunner.ts",
"test:asset": "npm version && cross-env TS_NODE_FILES=true jest --runInBand -- test/**/AssetTest.ts",

Remove mocha endpoint
- Remove mocha from package.json
- Run jest in github