Socket
Socket
Sign inDemoInstall

trap-chai

Package Overview
Dependencies
86
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    trap-chai

Chai integration for trap testing.


Version published
Weekly downloads
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Chai Plugin for trap

This plugin enables the use of the Chai assertion library within trap.

Getting Started

If you're on node >= v0.18, just

npm install trap-chai

If you're below that, you'll need to install the peer dependencies manually:

npm install trap@">=0.4"
npm install chai@1.x
npm install trap-chai

Then, edit (or create) your trap.config.js file in your test directory to have the following line:

require('trap-chai').init();

That's it! now you can use chai like you normally would!

Examples

Check out the examples folder, where I have copied the latest tests for Chai and converted them to trap. Be sure to take a look at trap.config.js.

Keywords

FAQs

Last updated on 08 Feb 2013

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc