Meteor.isDevelopment false in Mocha Test

Hi all,

observed a strange behavior when running my Mocha server tests as a github action right after updating from 2.15 to 2.16.

Until 2.15, while running tests, it was always the case that Meteor.isTest === true (obviously) but also Meteor.isDevelopment === true.

Now in 2.16, on my local machine I still have Meteor.isDevelopment === true but in my Github action I have Meteor.isDevelopment === false.

Edit: I also noted that Meteor.isProduction === true while running mocha test in my github action.

Questions:

  • What is the expected value of Meteor.isDevelopment while running a test?
  • What could be the reason for the diverging values of Meteor.isDevelopment on my local machine and the github action? I use the very same npm script to fire up the test…
  • How can I control or manually change the value of Meteor.isDevelopment in a safe way?

Meteor defines these values by checking the EV NODE_ENV:

Meteor.isProduction = meteorEnv.NODE_ENV === "production";
Meteor.isDevelopment = meteorEnv.NODE_ENV !== "production";

Did you change anything related to this EV? In any case, you can control those values by setting the NODE_ENV.