How to check if this test is running under AVA or in normal mode

I use AVA to run my tests. I am using the config.js file in the root, and I would like it to be different when running the test modules. For example, the path to the databases in production ~/.app/data.dbwill be /tmp/<randomid>/data.dbduring testing. With a mocha I just check existence it, but here I can’t

+4
source share
1 answer

I use the NODE_ENV variable to load various configurations for production, production and development. It works like a charm.

, : http://eng.datafox.co/nodejs/2014/09/28/nodejs-config-best-practices/

+1

Source: https://habr.com/ru/post/1656415/


All Articles