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

unexpected-sinon

Package Overview
Dependencies
Maintainers
2
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unexpected-sinon - npm Package Compare versions

Comparing version 7.1.0 to 7.1.1

8

documentation/assertions/spy/was-called-with.md

@@ -54,4 +54,4 @@ Passes if the spy was called with the provided arguments.

{ foo: 'bar' },
'baz',
undefined // expected undefined to be truthy
'baz'
// missing: should be truthy
) at theFunction (theFileName:xx:yy)

@@ -117,6 +117,6 @@ )

{ foo: 'bar' },
'baz',
// expected undefined to be truthy
'baz'
// missing: should be truthy
) at theFunction (theFileName:xx:yy)
)
```

@@ -149,5 +149,5 @@ /*global location*/

output.text(')');
if (value.getStackFrames) {
var topStackFrame = makePathsRelativeToCwdOrLocation(value.getStackFrames()[0].replace(/^\s*(?:at\s+|@)?/, ''));
output.sp().gray('at ' + topStackFrame);
var stackFrames = value.getStackFrames && value.getStackFrames();
if (Array.isArray(stackFrames) && stackFrames.length > 0) {
output.sp().gray('at ' + makePathsRelativeToCwdOrLocation(stackFrames[0].replace(/^\s*(?:at\s+|@)?/, '')));
}

@@ -194,7 +194,11 @@ return output;

expect.addAssertion('spy', 'was [not] called', function (expect, subject) {
this.errorMode = this.flags.not ? 'defaultOrNested' : 'default';
expect(getCalls(subject), '[!not] to satisfy', []);
expect.addAssertion('spy', 'was called', function (expect, subject) {
expect(getCalls(subject), 'not to satisfy', []);
});
expect.addAssertion('spy', 'was not called', function (expect, subject) {
this.errorMode = 'defaultOrNested';
expect(getCalls(subject), 'to satisfy', []);
});
expect.addAssertion('spyCall', 'to satisfy', function (expect, subject, value) {

@@ -201,0 +205,0 @@ var subjectType = expect.findTypeOf(subject);

{
"name": "unexpected-sinon",
"version": "7.1.0",
"version": "7.1.1",
"author": "Sune Sloth Simonsen <sune@we-knowhow.dk>",

@@ -41,5 +41,5 @@ "keywords": [

"sinon": "1.16.1",
"unexpected": "9.8.1",
"unexpected": "9.9.0",
"unexpected-documentation-site-generator": "2.5.2"
}
}

@@ -260,4 +260,4 @@ /*global unexpected*/

" { foo: 'bar' },\n" +
" 'baz',\n" +
" undefined // expected undefined to be truthy\n" +
" 'baz'\n" +
" // missing: should be truthy\n" +
" ) at theFunction (theFileName:xx:yy)\n" +

@@ -319,4 +319,4 @@ ")"

" { foo: 'bar' },\n" +
" 'baz',\n" +
" // expected undefined to be truthy\n" +
" 'baz'\n" +
" // missing: should be truthy\n" +
" ) at theFunction (theFileName:xx:yy)\n" +

@@ -323,0 +323,0 @@ ")"

@@ -324,6 +324,6 @@ /*global describe, it, beforeEach, sinon, unexpected*/

" spy(\n" +
" 'something else', // should equal { foo: 'bar' }\n" +
" undefined, // should equal 'baz'\n" +
" undefined // expected spy( 'something else' ) at theFunction (theFileName:xx:yy)\n" +
" // to satisfy { 0: { foo: 'bar' }, 1: 'baz', 2: match(truthy) }\n" +
" 'something else' // should equal { foo: 'bar' }\n" +
" // missing: should equal 'baz'\n" +
" // missing: expected spy( 'something else' ) at theFunction (theFileName:xx:yy)\n" +
" // to satisfy { 0: { foo: 'bar' }, 1: 'baz', 2: match(truthy) }\n" +
" ) at theFunction (theFileName:xx:yy),\n" +

@@ -454,3 +454,3 @@ " spy( { foo: 'bar' }, 'baz', true, false ) at theFunction (theFileName:xx:yy)\n" +

"invocations(\n" +
" stub() at theFunction (theFileName:xx:yy) // expected stub() at theFunction (theFileName:xx:yy) threw { name: 'TypeError' }\n" +
" stub() at theFunction (theFileName:xx:yy) // expected: threw { name: 'TypeError' }\n" +
" // expected Error() to satisfy { name: 'TypeError' }\n" +

@@ -548,3 +548,4 @@ " //\n" +

" stub() at theFunction (theFileName:xx:yy),\n" +
" stub() at theFunction (theFileName:xx:yy) // expected stub() at theFunction (theFileName:xx:yy) threw { name: 'Error' }\n" + " // expected TypeError() to satisfy { name: 'Error' }\n" +
" stub() at theFunction (theFileName:xx:yy) // expected: threw { name: 'Error' }\n" +
" // expected TypeError() to satisfy { name: 'Error' }\n" +
" //\n" +

@@ -551,0 +552,0 @@ " // {\n" +

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