Socket
Book a DemoInstallSign in
Socket

@ggoodman/ts-lab

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ggoodman/ts-lab

An opinionated wrapper over @hapi/lab with typescript and disposables support

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

Lab + TypeScript = 😍

Take the @hapi/lab you know and love and add a sprinkling of built-in TypeScript support and out comes ts-lab, an opinionated spin on vanilla lab.

See @hapi/lab on the official Hapi developer site for more information on Lab itself.

Differences

ts-lab is not a fork of @hapi/lab but instead wraps it. At the time of writing, the justification for this decision isn't entirely clear but here we are. This repo exposes a binary ts-lab that forwards arguments to the lab binary exposed by @hapi/lab with the addition of arguments to add TypeScript support. The module also exposes an API that wraps @hapi/lab's API. The differences are outlined below:

  • Out-of-the-box support for tests authored in TypeScript.
  • Exposes an instance of @hapi/code's assertion library as the top-level expect export.
  • Changes the optional flags arguments passed into test functions such that:
    • It no longer exports a mutable .onCleanup property.
    • Exports a .disposeOf(disposable: { dispose(): void }): void function. This can be used to register multiple disposables for disposal during the test's clean-up phase.

License

See LICENSE.md.

FAQs

Package last updated on 03 May 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