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 6.2.0 to 6.3.0

30

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

@@ -21,8 +21,8 @@ Passes if the spy was called with the provided arguments.

invocations(
spy([
0: { foo: 'bar' }, // should equal 'baz'
1: 'baz', // should equal { foo: 'bar' }
2: 'qux',
3: 'quux'
])
spy(
{ foo: 'bar' }, // should equal 'baz'
'baz', // should equal { foo: 'bar' }
'qux',
'quux'
)
)

@@ -55,7 +55,7 @@ ```

spy( { foo: 'bar' }, 'baz', 'qux', 'quux' ),
spy([
0: { foo: 'bar' },
1: 'baz',
2: undefined // expected undefined to be truthy
])
spy(
{ foo: 'bar' },
'baz',
undefined // expected undefined to be truthy
)
)

@@ -85,3 +85,3 @@ ```

invocations(
spy([
spy(
{ foo: 'bar' },

@@ -91,3 +91,3 @@ 'baz',

'quux' // should be removed
])
)
)

@@ -121,8 +121,8 @@ ```

spy( { foo: 'bar' }, 'baz', 'qux' ),
spy([
spy(
{ foo: 'bar' },
'baz',
// expected undefined to be truthy
])
)
)
```

@@ -185,3 +185,3 @@ // Copyright (c) 2013 Sune Simonsen <sune@we-knowhow.dk>

var subjectType = expect.findTypeOf(subject);
var spyArguments = toArray(subject.args);
var spyArguments = toSpyArguments(subject.args);

@@ -206,3 +206,3 @@ var valueType = expect.findTypeOf(value);

return expect.withError(function () {
expect(spyArguments, 'to satisfy', args);
return expect(spyArguments, 'to satisfy', args);
}, function (err) {

@@ -336,3 +336,3 @@ expect.fail({

return expect.promise(function () {
return expect(call, 'to satisfy', args);
return expect(call, 'to satisfy', args);
});

@@ -339,0 +339,0 @@ });

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

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

"sinon": "1.9.1",
"unexpected": "8.1.2",
"unexpected": "8.2.0",
"unexpected-documentation-site-generator": "2.2.3"
}
}

@@ -224,8 +224,8 @@ /*global unexpected*/

" invocations(\n" +
" spy([\n" +
" 0: { foo: 'bar' }, // should equal 'baz'\n" +
" 1: 'baz', // should equal { foo: 'bar' }\n" +
" 2: 'qux',\n" +
" 3: 'quux'\n" +
" ])\n" +
" spy(\n" +
" { foo: 'bar' }, // should equal 'baz'\n" +
" 'baz', // should equal { foo: 'bar' }\n" +
" 'qux',\n" +
" 'quux'\n" +
" )\n" +
" )"

@@ -257,7 +257,7 @@ );

" spy( { foo: 'bar' }, 'baz', 'qux', 'quux' ),\n" +
" spy([\n" +
" 0: { foo: 'bar' },\n" +
" 1: 'baz',\n" +
" 2: undefined // expected undefined to be truthy\n" +
" ])\n" +
" spy(\n" +
" { foo: 'bar' },\n" +
" 'baz',\n" +
" undefined // expected undefined to be truthy\n" +
" )\n" +
" )"

@@ -285,3 +285,3 @@ );

" invocations(\n" +
" spy([\n" +
" spy(\n" +
" { foo: 'bar' },\n" +

@@ -291,3 +291,3 @@ " 'baz',\n" +

" 'quux' // should be removed\n" +
" ])\n" +
" )\n" +
" )"

@@ -319,7 +319,7 @@ );

" spy( { foo: 'bar' }, 'baz', 'qux' ),\n" +
" spy([\n" +
" spy(\n" +
" { foo: 'bar' },\n" +
" 'baz',\n" +
" // expected undefined to be truthy\n" +
" ])\n" +
" )\n" +
" )"

@@ -326,0 +326,0 @@ );

@@ -265,4 +265,4 @@ /*global describe, it, beforeEach, sinon, unexpected*/

" invocations(\n" +
" spy([\n" +
" 0: {\n" +
" spy(\n" +
" {\n" +
" foo: 'baa' // should equal 'bar'\n" +

@@ -272,6 +272,6 @@ " // -baa\n" +

" },\n" +
" 1: 'baz',\n" +
" 2: true,\n" +
" 3: false\n" +
" ])\n" +
" 'baz',\n" +
" true,\n" +
" false\n" +
" )\n" +
" )");

@@ -299,7 +299,7 @@ });

" invocations(\n" +
" spy([\n" +
" 0: 'something else', // should equal { foo: 'bar' }\n" +
" 1: undefined, // should equal 'baz'\n" +
" 2: undefined // expected spy( 'something else' ) to satisfy { 0: { foo: 'bar' }, 1: 'baz', 2: match(truthy) }\n" +
" ]),\n" +
" spy(\n" +
" 'something else', // should equal { foo: 'bar' }\n" +
" undefined, // should equal 'baz'\n" +
" undefined // expected spy( 'something else' ) to satisfy { 0: { foo: 'bar' }, 1: 'baz', 2: match(truthy) }\n" +
" ),\n" +
" spy( { foo: 'bar' }, 'baz', true, false )\n" +

@@ -332,4 +332,4 @@ " )");

it('passes if the spy was called with the provided arguments and no others', function () {
spy('foo', 'baz', 'baz');
spy('foo', 'bar', 'baz');
spy('foo', 'bar', 'baz');
expect(spy, 'was called with exactly', 'foo', 'bar', sinon.match.truthy);

@@ -347,3 +347,3 @@ });

" invocations(\n" +
" spy([\n" +
" spy(\n" +
" 'foo',\n" +

@@ -353,3 +353,3 @@ " 'bar',\n" +

" 'qux' // should be removed\n" +
" ])\n" +
" )\n" +
" )");

@@ -378,3 +378,3 @@ });

" spy( 'foo', 'bar', 'baz' ),\n" +
" spy([\n" +
" spy(\n" +
" 'foo',\n" +

@@ -384,3 +384,3 @@ " 'bar',\n" +

" 'qux' // should be removed\n" +
" ])\n" +
" )\n" +
" )");

@@ -387,0 +387,0 @@ });

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