General schema validation test results in an error when run more than once

Description

Executing npm test results in at least one error when run more than once. As the logs confirm this error is due to the existing directory 'report'. This 'report' directory is created by General.spec.ts.

Expected behavior

General.spec.ts should not fail its test because of an existing directory.

  1 failing

  1) ValidateTestFiles
       validateTestFiles:
     Error: EEXIST: file already exists, mkdir 'report'
      at Object.mkdirSync (fs.js:731:3)
      at ValidateTestFiles.<anonymous> (test/General.spec.ts:42:5)
      at Generator.next (<anonymous>)
      at fulfilled (test/General.spec.ts:10:58)

Possible fix ?

Only create directory 'report' if it is not already existing.

Fix

Use node v10.15 or higher.

If you're already using nvm:

nvm install lts/dubnium
nvm use lts/dubnium
Edited by Rainer Killinger