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

chai-lint

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chai-lint - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

17

index.js
module.exports = function chaiLint(chai, utils) {
var methods = [
var standardMethods = [
'ok',

@@ -12,9 +12,18 @@ 'true',

addMethods(methods);
var sinonMethods = [
'called',
'calledOnce',
'calledTwice',
'calledThrice',
'calledWithNew',
];
addMethods(standardMethods, 'be');
addMethods(sinonMethods, 'been');
addMethod('exist', 'toExist');
function addMethods(methods) {
function addMethods(methods, prefix) {
for (var i = methods.length - 1; i >= 0; i--) {
var property = methods[i];
var name = 'be' + property[0].toUpperCase() + property.slice(1);
var name = prefix + property[0].toUpperCase() + property.slice(1);
addMethod(methods[i], name);

@@ -21,0 +30,0 @@ }

{
"name": "chai-lint",
"version": "0.1.0",
"version": "0.1.1",
"description": "Chai plugin which plays nice with linters",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -22,1 +22,9 @@ Allows to bypass [chai](https://github.com/chaijs/chai)'s property assertions, which make linters unhappy (confer https://github.com/eslint/eslint/issues/2102).

```
Sinon assertions are also supported, for example:
```
expect(spy).to.have.beenCalled();
```
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