All files / server/test options.js

83.33% Statements 5/6
50% Branches 1/2
100% Functions 1/1
100% Lines 5/5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1611x 11x     11x     97x     97x          
const server = require('../');
const instance = require('./instance');
 
// Parse the server options
module.exports = (...args) => {
 
  // A server.js instance or the promise of it, just return it
  Iif (instance(args[0])) return args[0];
 
  // Be able to set global variables from outside
  return Object.assign({}, ...args.reverse(), {
    env: undefined,
    secret: undefined
  });
};