There is something wrong with the latest truffle version.
To solve this problem I had to do the following things to find a truffle version that worked.
First check for available versions of truffle with the following command.
npm view truffle versions
Then for each item on the list starting from the latest version.
I uninstalled truffle with
npm uninstall -g truffle
then installed the next oldest version with
npm install -g truffle@<version#>
then deleted the build folder
then compiled the project with
truffle compile
then ran
truffle test
if this fails move on to the next oldest version and repeat the test.
Best Answer
npm uninstall -g truffle
npm install -g truffle@5.1.10
(always got me back on track)