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

@types/chai

Package Overview
Dependencies
Maintainers
1
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/chai

TypeScript definitions for chai

  • 4.2.22
  • ts3.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5M
decreased by-9.27%
Maintainers
1
Weekly downloads
 
Created

What is @types/chai?

The @types/chai package provides TypeScript type definitions for Chai, a BDD / TDD assertion library for node and the browser. This allows developers to use Chai in TypeScript projects with type checking and IntelliSense support in code editors.

What are @types/chai's main functionalities?

Expect/Should Assertions

Provides fluent API for asserting facts about values in a readable manner. Supports both 'expect' and 'should' styles.

expect(foo).to.be.a('string');
expect(foo).to.equal('bar');
expect(foo).to.have.lengthOf(3);
should.exist(foo);
foo.should.be.a('string');
foo.should.equal('bar');

Assert Style

Enables a more classical assert style, similar to node's assert module but with more capabilities.

assert.typeOf(foo, 'string');
assert.equal(foo, 'bar');
assert.lengthOf(foo, 3);

Property Assertions

Allows asserting the existence of an object's property, optionally asserting its value or properties.

expect(foo).to.have.property('length').with.lengthOf(3);
foo.should.have.property('length').with.lengthOf(3);

Other packages similar to @types/chai

FAQs

Package last updated on 21 Sep 2021

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