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

chai-to-assert

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chai-to-assert

chai to assert codemod

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

chai-to-assert

A jscodeshift codemod that transforms from chai to Node assert.

Build Status NPM version Code Style License

USAGE

$ npm install -g jscodeshift
$ npm install chai-to-assert
$ jscodeshift -t node_modules/chai-to-assert/lib/bdd-api-to-node-assert.js target-dir

FEATURES

BDD Style API

  • expect
  • should
properties
  • .ok
  • .true
  • .false
  • .null
  • .undefined
  • .exist
  • .NaN
  • .finite
  • .extensible
  • .sealed
  • .frozen
chainable methods
  • .a(type) (alias an) (only for primitives and null)
  • .lengthOf(value) (alias .length)
methods
  • .equal(value) (alias .equals, .eq)
  • .eql(value) (alias .eqls)
  • .match(regexp) (alias .matches)
  • .above(value) (alias .gt, .greaterThan)
  • .least(value) (alias .gte)
  • .below(value) (alias .lt, .lessThan)
  • .most(value) (alias .lte)
  • .within(start, finish)
  • .closeTo(expected, delta) (alias .approximately)
  • .property(name, [value])
  • .ownProperty(name, [value]) (alias .haveOwnProperty)
  • .ownPropertyDescriptor(name, [descriptor]) (alias .haveOwnPropertyDescriptor)
  • .instanceof(constructor) (alias .instanceOf)
  • .throw([errorLike], [errMsgMatcher]) (alias .throws, .Throw)
  • .respondTo(method) (alias .respondsTo)
  • .satisfy(predicate) (alias .satisfies)
  • .string(string)
  • .oneOf(list)

AUTHOR

LICENSE

Licensed under the MIT license.

Keywords

FAQs

Package last updated on 14 Feb 2017

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