Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

test-object-model

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

test-object-model

test-object-model

  • 0.4.1
  • unpublished
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

view on npm npm module downloads Build Status Dependency Status js-standard-style

test-object-model

A test tree - used as input to one of several runners:

Synopsis

Create a module which exports one or more tests.

const Tom = require('test-object-model')
const assert = require('assert')

const tom = new Tom()

tom.test('Quick maths', function () {
  const result = 2 + 2 - 1
  assert.strictEqual(result, 3)
})

module.exports = tom

Usage

Create a simple test.

tom.test('name', function () {
  // test
})

Skip a test.

tom.skip('name', function () {
  // test
})

Skip all but this test.

tom.only('name', function () {
  // test
})

Ignore a test.

tom.test('name')

Test context.

tom.test('name', function () {
  const testName = this.name
  const testNumber = this.index
})

Pass the TOM as input into a test-runner.

Documentation


© 2018-19 Lloyd Brookes <75pound@gmail.com>.

FAQs

Package last updated on 02 May 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc