Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including @cuties/wall with all npm packages installed. Try it out:

var wall = require("@cuties/wall")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@cuties/wall v1.1.2

Quality checker for projects for browser js and Node.js, can be integrated in build process of Page, also can be as stand alone application.


Wall is a tool that includes static analysis and test coverage. It was mainly made for Page and based on the Async Tree Pattern.

NPM Version Build Status codecov


npm install @cuties/wall

Init eslint

node_modules/.bin/eslint --init


npm test


npm run build

Async objects


This async object represents the process where static analysis is executed.

new ExecutedLint(process, './src').call()

Async call: executedLint.


This async object represents the process where test coverage is executed.

new ExecutedTestCoverage(
  process, './test-executor.js'

File test-executor contains script that runs all your tests. You can use this library for doing such things.

Async call: executedTestCoverage.


This async object represents the process where test coverage check is executed(after running tests via ExecutedTestCoverage). If coverage falls below a threshold (that can be configured via ConfiguredTestCoverage) the process fails. You can configure required test coverage percentages of lines, functions and branches via options in params.

new ExecutedTestCoverageCheck(
  new ExecutedTestCoverage(process, '/test-executor.js'),
  { lines: 100, functions: 100, branches: 100, 'statements': 100 }

Async call: executedTestCoverageCheck.


This async object represents the process where test coverage is reported (after running tests via ExecutedTestCoverage).

new ExecutedTestCoverageReport(
  new ExecutedTestCoverage(process, '/test-executor.js'), 'json-summary'

Async call: executedTestCoverageReport. About format(default value is text) of report you can read here.

Complete example

For making your project more qualitative use following composition:

const {
} = require('@cuties/wall')

new ExecutedLint(process, './src').after(
  new ExecutedTestCoverageCheck(
    new ExecutedTestCoverageReport(
      new ExecutedTestCoverage(
        process, './test-executor.js'
      ), 'json-summary'
    ), { lines: 100, functions: 100, branches: 100, statements: 100 }


const executor = require('test-executor');


test-executor library

Log total coverage (LoggedTotalCoverageByJsonSummary)

If you use json-summary in ExecutedTestCoverageReport, then this async object generates report into coverage/coverage-summary.json file. And you can log to console total coverage numbers via LoggedTotalCoverageByJsonSummary, ReadDataByPath(cutie-fs) and ParsedJson(cutie-json):

const { ReadDataByPath } = require('@cuties/fs')
const { ParsedJSON } = require('@cuties/json')
const { ExecutedTestCoverage, ExecutedTestCoverageReport, LoggedTotalCoverageByJsonSummary } = require('./../index')

new ExecutedTestCoverageReport(
  new ExecutedTestCoverage(process, './test-executor.js'),
  new LoggedTotalCoverageByJsonSummary(
    new ParsedJSON(
      new ReadDataByPath('coverage/coverage-summary.json', { encoding: 'utf8' })
    ), (linesPct, statementsPct, functionsPct, branchesPct) => {
      return (linesPct + statementsPct + functionsPct + branchesPct) / 4

First argument of LoggedTotalCoverageByJsonSummary is json that contains coverage numbers(lines, statements, functions, branches percentages), second one is a function that calculates total number (in that case we just take average value of coverage numbers).

Output would look like:

Total coverage: 100%

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free