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

sinon-chai

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sinon-chai - npm Package Compare versions

Comparing version 1.2.2 to 1.3.0

.coverignore

21

lib/sinon-chai.js

@@ -1,6 +0,1 @@

/*jshint
curly: true, eqeqeq: true, immed: true, latedef: true, newcap: true, noarg: true, nonew: true, trailing: true,
undef: true, white: true, es5: true, strict: true, node: true */
/*global define: false */
(function (sinonChai) {

@@ -56,2 +51,14 @@ "use strict";

function isSpy(putativeSpy) {
return typeof putativeSpy === "function" &&
typeof putativeSpy.getCall === "function" &&
typeof putativeSpy.calledWithExactly === "function";
}
function assertIsAboutSpy(assertion) {
if (!isSpy(assertion.obj)) {
throw new TypeError(chai.inspect(assertion.obj) + " is not a spy!");
}
}
function getMessages(spy, action, nonNegatedSuffix, always, args) {

@@ -73,2 +80,4 @@ var verbPhrase = always ? "always have " : "have ";

property(name, function () {
assertIsAboutSpy(this);
var messages = getMessages(this.obj, action, nonNegatedSuffix, false);

@@ -81,2 +90,4 @@ this.assert(this.obj[name], messages.affirmative, messages.negative);

method(chaiName, function () {
assertIsAboutSpy(this);
var alwaysSinonMethod = "always" + sinonName[0].toUpperCase() + sinonName.substring(1);

@@ -83,0 +94,0 @@ var shouldBeAlways = this._always && typeof this.obj[alwaysSinonMethod] === "function";

@@ -12,3 +12,3 @@ {

],
"version": "1.2.2",
"version": "1.3.0",
"author": "Domenic Denicola <domenic@domenicdenicola.com> (http://domenicdenicola.com)",

@@ -28,3 +28,4 @@ "repository": {

"test": "mocha",
"lint": "jshint ./lib --show-non-errors"
"lint": "jshint ./lib --show-non-errors",
"cover": "cover run node_modules/mocha/bin/_mocha && cover report html && start ./cover_html/index.html"
},

@@ -40,5 +41,6 @@ "engines": {

"mocha": "1",
"chai": ">=0.3.3 <=0.5",
"chai": "~0.5",
"cover": "*",
"jshint": "*"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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