Q:

How can I use test database for intern testing

I am using intern for testing in my node project, however I don't know how to set up the intern properly so that it uses 'test' database instead of 'development' database.  I was trying to put the code process.env. NODE_ENV = 'test' into my test file, but it doesn't work.  My intern.js file is just the default file and my intern running command is /node_modules/.bin/intern-client config=tests/intern.  All the test run properly except the data was generated in the development database not the test database.  Anyone knows how to fix it?  Thank you! 

Here is one of my test case in my test suite, which add the data to the database
tdd.test('normal user creation', function(){
  var name = chance.name();
  return models.User.create({
    name: name,
    gender: chance.gender(),
    email: chance.email(),
    balance: 0.0,
    phone_number: chance.phone({country: 'ca', mobile: true})
  }).then(function (user) {
    return assert.strictEqual(name, user.name, 'user name should ' +
      'be equal to each other');
  }).catch(function (error) {
    throw new Error(error.message);
  });
});

A:

Finally, I found the solution.  In the package.json file, set the scripts option as 
"scripts": {
  "start": "node src/index.js",
  "test": "set NODE_ENV=test&&intern-client config=tests/intern"
},

then run npm test, the intern will run the test base on test database now

