javascriptnode.jsunit-testingtestingava

Ava js not executing tests


so I have an issue with ava >=3.0, with 2.4.0 all my tests are executing fine, I have a ts project a compile to js and execute all js test files. When migrating to 3.0 (or 3.8) I have tried both, I keep getting this error...


  ✖ Internal error
  Error: EEXIST: file already exists, mkdir '/Users/rage/repos/*****/****-api/node_modules/.cache/ava'
  Error: EEXIST: file already exists, mkdir '/Users/rage/repos/*****/****-api/node_modules/.cache/ava'

If the cache file (node_modules/node_modules/.cache/ava) do not exists I get the following error...

✖ Couldn’t find any files to test

  ✖ Internal error
  Error: ENOENT: no such file or directory, mkdir '/Users/rage/repos/*****/****-api/node_modules/.cache/ava'
  Error: ENOENT: no such file or directory, mkdir '/Users/rage/repos/*****/****-api/node_modules/.cache/ava'

So not sure if there is a step I'm missing


Solution

  • What Node.js version are you using? AVA requires at least Node.js 10.18. It might be that on older versions the mkdir function behaves differently.