Completed
Push — master ( 2c40ae...326927 )
by Fike
38s
created

tasks/Workspace/index.js   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 35
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
c 1
b 0
f 0
nc 1
dl 0
loc 35
rs 10
wmc 1
mnd 0
bc 1
fnc 1
bpm 1
cpm 1
noi 0
1
var Path = require('path')
2
3
var root = Path.resolve(__dirname, '../..')
4
var tmpDirectory = Path.resolve(root, 'tmp')
5
var metadataDirectory = Path.resolve(tmpDirectory, 'metadata')
6
var reportDirectory = Path.resolve(tmpDirectory, 'report')
7
var testDirectory = Path.resolve(root, 'test')
8
9
/**
10
 * @param {string} name
11
 * @return {{report: string, metadata: string}}
12
 */
13
function toolPaths (name) {
14
  return {
15
    report: Path.resolve(reportDirectory, name),
16
    metadata: Path.resolve(metadataDirectory, name)
17
  }
18
}
19
20
module.exports = {
21
  root: root,
22
  tmp: tmpDirectory,
23
  modules: Path.join(root, 'node_modules'),
24
  report: reportDirectory,
25
  metadata: metadataDirectory,
26
  allure: toolPaths('allure'),
27
  junit: toolPaths('junit'),
28
  xunit: toolPaths('xunit'),
29
  coverage: toolPaths('coverage'),
30
  test: {
31
    suites: Path.resolve(testDirectory, 'suite'),
32
    support: Path.resolve(testDirectory, 'support')
33
  },
34
  suites: ['unit', 'integration', 'acceptance']
35
}
36