New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@jsspec/format

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsspec/format

Output formatter for jsspec

latest
Source
npmnpm
Version
0.1.7
Version published
Weekly downloads
26
85.71%
Maintainers
1
Weekly downloads
 
Created
Source

@jsspec/format

npm (scoped) Travis AppVeyor

Default reporter formatters for jsspec.

class MyFormatter {
  static get description() { return 'I write stuff to the screen'; }
  constructor(specRunner){}
}

subscribe to specRunner events:

  specRunner.on('fileStart' (uniqueFileRunReference, fileName) => {});
  specRunner.on('fileEnd' (uniqueFileRunReference, fileName) => {});
  specRunner.on('contextStart' (specRunner, context) => {});
  specRunner.on('contextEnd' (specRunner, context) => {});
  specRunner.on('exampleStart' (specRunner, example) => {});
  specRunner.on('exampleEnd' (specRunner, example) => {});
  specRunner.on('contextLevelFailure', (specRunner, exampleOrContext) => {});
  specRunner.on('runEnd' (specRunner) => {});

context, example and exampleOrContext each respond to the following:

id // [For a conetxt only] a unique name for this context
description // the description supplied
fullDescription // the description, with all context descriptions pre-pended
kind // the class name of the object
base // a uniq name relating to this spec file run
failure // which may be (hopefully) undefined

failure is either an exception, or an exception converted to an object, depending on how JSSpec was run. It will have the following attributes:

constructor.name
stack
message
expected // may be empty
actual // may be empty

Formatters included:

Null

Does nothing. Use with --format null. Can be used as a base class to create other formatters.

Documentation

-fd or --format documentation. Presents a tree of execution results with checks and crosses for example results. A summary of failures are provided at the end.

Dot

-fo or --format dot. Single character output per test. With summary at the end.

Keywords

jsspec

FAQs

Package last updated on 27 Nov 2020

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