The --require and -r flags are deprecated

0

When wanting to run the AVA tests on Windows using this command:

npm run test

which in turn executes this command:

"SET \"NODE_ENV=test\" & nyc ava --require babel-register test/**-test.js $AVA_ARGS",

throws me this error:

  

The --require and -r flags are deprecated. Requirements should be   configured in package.json - see documentation.

the command worked correctly for me the last time I executed it, I searched the npm documentation as the error recommended but I could not find anything to solve the problem, what is the new tag that replaces --require ? thanks for the help.

    
asked by Andrés Chamorro 19.12.2016 в 19:00
source

1 answer

0

Just in case someone else happens to get through, it is solved just by removing this part of the command:

--require babel-register

staying like this:

"SET \"NODE_ENV=test\" & nyc ava test/**-test.js $AVA_ARGS",
    
answered by 19.12.2016 / 21:12
source