Socket
Socket
Sign inDemoInstall

@types/sinon-chai

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/sinon-chai - npm Package Compare versions

Comparing version 2.7.20-alpha to 2.7.21-alpha

147

index.d.ts

@@ -9,78 +9,81 @@ // Type definitions for sinon-chai 2.7.0

declare namespace Chai {
import * as Sinon from 'sinon';
interface LanguageChains {
always: Assertion;
}
declare global {
interface Assertion {
/**
* true if the spy was called at least once.
*/
called: Assertion;
/**
* @param count The number of recorded calls.
*/
callCount(count: number): Assertion;
/**
* true if the spy was called exactly once.
*/
calledOnce: Assertion;
/**
* true if the spy was called exactly twice.
*/
calledTwice: Assertion;
/**
* true if the spy was called exactly thrice.
*/
calledThrice: Assertion;
/**
* Returns true if the spy was called before anotherSpy.
*/
calledBefore(anotherSpy: Sinon.SinonSpy): Assertion;
/**
* Returns true if the spy was called after anotherSpy.
*/
calledAfter(anotherSpy: Sinon.SinonSpy): Assertion;
/**
* Returns true if spy/stub was called with the new operator. Beware that
* this is inferred based on the value of the this object and the spy
* function's prototype, so it may give false positives if you actively
* return the right kind of object.
*/
calledWithNew: Assertion;
/**
* Returns true if context was this for this call.
*/
calledOn(context: any): Assertion;
/**
* Returns true if call received provided arguments (and possibly others).
*/
calledWith(...args: any[]): Assertion;
/**
* Returns true if call received provided arguments and no others.
*/
calledWithExactly(...args: any[]): Assertion;
/**
* Returns true if call received matching arguments (and possibly others).
* This behaves the same as spyCall.calledWith(sinon.match(arg1), sinon.match(arg2), ...).
*/
calledWithMatch(...args: any[]): Assertion;
/**
* Returns true if spy returned the provided value at least once. Uses
* deep comparison for objects and arrays. Use spy.returned(sinon.match.same(obj))
* for strict comparison (see matchers).
*/
returned(obj: any): Assertion;
/**
* Returns true if spy threw the provided exception object at least once.
*/
thrown(obj?: Error|typeof Error|string): Assertion;
export namespace Chai {
interface LanguageChains {
always: Assertion;
}
interface Assertion {
/**
* true if the spy was called at least once.
*/
called: Assertion;
/**
* @param count The number of recorded calls.
*/
callCount(count: number): Assertion;
/**
* true if the spy was called exactly once.
*/
calledOnce: Assertion;
/**
* true if the spy was called exactly twice.
*/
calledTwice: Assertion;
/**
* true if the spy was called exactly thrice.
*/
calledThrice: Assertion;
/**
* Returns true if the spy was called before anotherSpy.
*/
calledBefore(anotherSpy: Sinon.SinonSpy): Assertion;
/**
* Returns true if the spy was called after anotherSpy.
*/
calledAfter(anotherSpy: Sinon.SinonSpy): Assertion;
/**
* Returns true if spy/stub was called with the new operator. Beware that
* this is inferred based on the value of the this object and the spy
* function's prototype, so it may give false positives if you actively
* return the right kind of object.
*/
calledWithNew: Assertion;
/**
* Returns true if context was this for this call.
*/
calledOn(context: any): Assertion;
/**
* Returns true if call received provided arguments (and possibly others).
*/
calledWith(...args: any[]): Assertion;
/**
* Returns true if call received provided arguments and no others.
*/
calledWithExactly(...args: any[]): Assertion;
/**
* Returns true if call received matching arguments (and possibly others).
* This behaves the same as spyCall.calledWith(sinon.match(arg1), sinon.match(arg2), ...).
*/
calledWithMatch(...args: any[]): Assertion;
/**
* Returns true if spy returned the provided value at least once. Uses
* deep comparison for objects and arrays. Use spy.returned(sinon.match.same(obj))
* for strict comparison (see matchers).
*/
returned(obj: any): Assertion;
/**
* Returns true if spy threw the provided exception object at least once.
*/
thrown(obj?: Error | typeof Error | string): Assertion;
}
}
}
declare module "sinon-chai" {
function sinonChai(chai: any, utils: any): void;
namespace sinonChai { }
export = sinonChai;
}
declare function sinonChai(chai: any, utils: any): void;
declare namespace sinonChai { }
export = sinonChai;
{
"name": "@types/sinon-chai",
"version": "2.7.20-alpha",
"version": "2.7.21-alpha",
"description": "TypeScript definitions for sinon-chai 2.7.0",

@@ -8,8 +8,12 @@ "main": "",

"author": "Kazi Manzur Rashid <https://github.com/kazimanzurrashid/>, Jed Mao <https://github.com/jedmao/>",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"license": "MIT",
"typings": "index.d.ts",
"dependencies": {
"@types/chai": "*",
"@types/sinon": "*"
"@types/sinon": "1.16.*",
"@types/chai": "3.4.*"
}
}

@@ -11,9 +11,9 @@ # Installation

Additional Details
* Last updated: Wed, 25 May 2016 04:20:36 GMT
* File structure: OldUMD
* Last updated: Fri, 01 Jul 2016 18:42:34 GMT
* File structure: ProperModule
* Library Dependencies: chai, sinon
* Module Dependencies: none
* Global values: none
* Module Dependencies: sinon
* Global values: sinonChai
# Credits
These definitions were written by Kazi Manzur Rashid <https://github.com/kazimanzurrashid/>, Jed Mao <https://github.com/jedmao/>.

@@ -8,3 +8,5 @@ {

],
"moduleDependencies": [],
"moduleDependencies": [
"sinon"
],
"libraryMajorVersion": "2",

@@ -17,4 +19,6 @@ "libraryMinorVersion": "7",

"sourceBranch": "types-2.0",
"kind": "OldUMD",
"globals": [],
"kind": "ProperModule",
"globals": [
"sinonChai"
],
"declaredModules": [

@@ -26,3 +30,3 @@ "sinon-chai"

],
"contentHash": "ad6aa0347b6e55f64e6a6a0a678ce1e9874b116cef242fefd765a220b072507d"
"contentHash": "38e60cd5be2a84dc8ed9ab19bfa3a95fe047be9107292290779df81829fee42c"
}
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