Registry / testing / hydro-formatter

hydro-formatter

JSON →
library2.2.8jsnpmunverified

Base formatter for the Hydro test framework (v2.2.8). Provides a plugin interface for custom output formatting in Hydro test runners. Last updated in 2014, the package is in maintenance mode with no active development. It is specific to Hydro and offers a simple base class for formatters.

npm install hydro-formatter
INSTALL
IMPORT
SIG · HYDRO-FORMATTER
H
hydro-formatter
testingjavascriptv2.2.8
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Formatter
const Formatter = require('hydro-formatter');
import Formatter from 'hydro-formatter';
This package is CJS-only; ESM import will fail
Formatter
var Formatter = require('hydro-formatter');
const { Formatter } = require('hydro-formatter');
Default export, not named
hydro-formatter
require('hydro-formatter').Formatter
require('hydro-formatter/Formatter')
No subpath exports; only main entry

Shows how to create a custom formatter by inheriting from the base Formatter class and overriding the format method.

var Formatter = require('hydro-formatter'); var util = require('util'); function MyFormatter() { Formatter.call(this); } util.inherits(MyFormatter, Formatter); MyFormatter.prototype.format = function() { return 'custom output'; }; module.exports = MyFormatter;
Debug
Known issues
deprecatedThe whole Hydro ecosystem is unmaintained
fix
Migrate to a modern test framework like Mocha, Jest, or Ava
affects: >=0.0.0
gotchaOnly works with Hydro test runner
fix
This formatter is not a standalone formatter; it must be used with the Hydro framework
affects: >=0.0.0
gotchaCJS-only; no ESM support
fix
Use require() instead of import
affects: >=0.0.0
deprecatedPackage last updated in 2014
fix
Consider using a maintained alternative
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'hydro-formatter'
hydro-formatter is not installed
fix
npm install hydro-formatter
TypeError: Class constructor Formatter cannot be invoked without 'new'
Using ES6 class syntax instead of function constructor
fix
Use function constructor and util.inherits as shown in quickstart
hydro-formatter requires a peer of hydro but none was installed
Missing peer dependency hydro
fix
npm install hydro
Upgrade
Version history
2.2.8latest on npm
Audit
Dependencies
hydrorequiredPeer dependency: needs Hydro test framework to attach formatter
Agent activity
6 hits · last 30 days
node
6
Resources
hydro-formatter — npm install hydro-formatter · libregistry