New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@hydre/doubt

Package Overview
Dependencies
Maintainers
3
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hydre/doubt

Testing made right

  • 7.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14
decreased by-64.1%
Maintainers
3
Weekly downloads
 
Created
Source

@hydre/doubt

An elegant and minimal TAP 13 compliant testing library

Tester c'est douter

Test your code and pipe the output to a consumer like tape-spec-emoji

Concept

No fugazzi here, just equality

Toc

Install

npm i -D @hydre/doubt

Use

Usage is trivial

  • stdout - Doubt doesn't pollute the standard output, use any stream
  • title - Test suite title
  • calls - Enforce how many tests you want, it will fails if the count doesn't match
import Doubt from '@hydre/doubt'

const doubt = Doubt({
  stdout : process.stdout,
  title  : 'Testing is simple',
  calls  : 1,
})

And then write some tests

doubt['Roses are red']({
  because: 'red',
  is     : 'red',
})

Format

import Doubt from '@hydre/doubt'
import reporter from 'tap-spec-emoji'
import { pipeline, PassThrough } from 'stream'

const through = new PassThrough()

pipeline(
    through,
    reporter(),
    process.stdout,
    () => {},
)

const doubt = Doubt({
  stdout : through,
  title  : 'Testing is simple',
  calls  : 4,
})

doubt['Roses are red']({
  because: 'red',
  is     : 'red',
})

doubt['Violets are blue']({
  because: 'blue',
  is     : 'blue',
})

doubt['Doubt is awesome']({
  because: { amazing: true },
  is     : { amazing: true },
})

doubt['Your tests should be too']({
  because: { 'using doubt': true },
  is     : { 'using doubt': false },
})

Keywords

FAQs

Package last updated on 19 Jul 2022

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