Code coverage report for mongodb-version-manager/lib/path.js

Statements: 83.33% (20 / 24)      Branches: 50% (1 / 2)      Functions: 33.33% (2 / 6)      Lines: 83.33% (20 / 24)      Ignored: none     

All files » mongodb-version-manager/lib/ » path.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 411 1   1 1     1       1       1       1       1 1 1       1     1 1 1 1 1 1 1 1  
var path = require('path');
var config = require('./config');
 
function base(pkg) {
  return path.resolve(config.cache + '/' + pkg.name);
}
 
function dest(pkg) {
  return path.resolve(base(pkg) + '/' + pkg.version);
}
 
function artifacts() {
  return path.resolve(config.cache + '/.artifacts');
}
 
function artifact(pkg) {
  return path.resolve(artifacts(pkg) + '/' + pkg.artifact);
}
 
function bin(pkg) {
  return path.resolve(dest(pkg) + '/bin');
}
 
function current(pkg) {
  Eif (!pkg) {
    pkg = {
      name: 'mongodb'
    };
  }
  return path.resolve(base(pkg) + '/current');
}
 
module.exports.dest = dest;
module.exports.base = base;
module.exports.artifacts = artifacts;
module.exports.artifact = artifact;
module.exports.bin = bin;
module.exports.current = current;
module.exports.resolve = path.resolve;
module.exports.join = path.join;