Socket
Book a DemoInstallSign in
Socket

tess

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tess

assert(tests===tess)

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
921
63.88%
Maintainers
1
Weekly downloads
 
Created
Source

tess

Simple test runner.

Use

$ npm install --save-dev tess
// test.js

var assert = require('assert')
var tess = require('tess')

tess(function(it) {
  it('works', function() {
    assert(true)
  })
})

API

var results = tess([opts ,] suite)

opts

  • (optional)
  • Type: Object|String
opts.name
  • Type: String A label for this suite of tests. You may also pass this in in place of the opts object.
opts.shh
  • Type: Boolean Won't print test results to stdout.

suite

  • Type: Function Encapsulates all of your tests.

When invoked, this function will receive a function as its first argument.

suite(function(title, fn) {})
title
  • Type: String The name to assign to your test.
fn
  • Type: Function The function that wraps your assertions.

results

  • Type: Array The results of all of your tests after running them.
results[].fn
  • Type: Function The function that was tested.
results[].success
  • Type: Boolean Signals if the test succeeded or failed.
results[].title
  • Type String The name of the test that was run.
results[].error
  • Type: Object If the test failed, this contains the error object.

Keywords

tests

FAQs

Package last updated on 17 Oct 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts