UNPKG

test-executor

Version:

Executes test scripts in the specified dirs.

29 lines (26 loc) 1.08 kB
'use strict' const ExecutedLint = require('./wall/ExecutedLint') const ExecutedTestCoverage = require('./wall/ExecutedTestCoverage') const ExecutedTestCoverageCheck = require('./wall/ExecutedTestCoverageCheck') const ExecutedTestCoverageReport = require('./wall/ExecutedTestCoverageReport') const LoggedTotalCoverageByJsonSummary = require('./wall/LoggedTotalCoverageByJsonSummary') const ReadDataByPath = require('./fs/ReadDataByPath') const ParsedJSON = require('./json/ParsedJSON') new ExecutedLint(process, './src', './test').after( new ExecutedTestCoverageReport( new ExecutedTestCoverageCheck( new ExecutedTestCoverage( process, './test' ), { 'lines': 90, 'functions': 100, 'branches': 70 } ), 'json-summary' ).after( new LoggedTotalCoverageByJsonSummary( new ParsedJSON( new ReadDataByPath('coverage/coverage-summary.json', { encoding: 'utf8' }) ), (linesPct, statementsPct, functionsPct, branchesPct) => { return (linesPct + statementsPct + functionsPct + branchesPct) / 4 } ) ) ).call()