mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
#4372 - add should support for fluent & should extras
This commit is contained in:
parent
2259de6588
commit
a358c640e7
6
chai-subset/chai-subset.d.ts
vendored
6
chai-subset/chai-subset.d.ts
vendored
@ -1,6 +1,6 @@
|
||||
// Type definitions for chai-subset 1.0.0
|
||||
// Project: https://github.com/e-conomic/chai-subset
|
||||
// Definitions by: Sam Noedel <https://github.com/delta62/>
|
||||
// Definitions by: Sam Noedel <https://github.com/delta62/>, Andrew Brown <https://github.com/AGBrown>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../chai/chai.d.ts" />
|
||||
@ -11,10 +11,6 @@ declare module Chai {
|
||||
}
|
||||
}
|
||||
|
||||
interface Object {
|
||||
should: Chai.Assertion;
|
||||
}
|
||||
|
||||
declare module "chai-subset" {
|
||||
function chaiSubset(chai: any, utils: any): void;
|
||||
export = chaiSubset;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
27
chai/chai.d.ts
vendored
27
chai/chai.d.ts
vendored
@ -1,12 +1,15 @@
|
||||
// Type definitions for chai 2.0.0
|
||||
// Project: http://chaijs.com/
|
||||
// Definitions by: Jed Mao <https://github.com/jedmao/>, Bart van der Schoor <https://github.com/Bartvds>
|
||||
// Definitions by: Jed Mao <https://github.com/jedmao/>,
|
||||
// Bart van der Schoor <https://github.com/Bartvds>,
|
||||
// Andrew Brown <https://github.com/AGBrown>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module Chai {
|
||||
|
||||
interface ChaiStatic {
|
||||
expect: ExpectStatic;
|
||||
should(): Should;
|
||||
/**
|
||||
* Provides a way to extend the internals of Chai
|
||||
*/
|
||||
@ -25,6 +28,24 @@ declare module Chai {
|
||||
(target: any, message?: string): Assertion;
|
||||
}
|
||||
|
||||
interface ShouldAssertion {
|
||||
equal(value1: any, value2: any, message?: string): void;
|
||||
Throw: ShouldThrow;
|
||||
throw: ShouldThrow;
|
||||
exist(value: any, message?: string): void;
|
||||
}
|
||||
|
||||
interface Should extends ShouldAssertion {
|
||||
not: ShouldAssertion;
|
||||
fail(actual: any, expected: any, message?: string, operator?: string): void;
|
||||
}
|
||||
|
||||
interface ShouldThrow {
|
||||
(actual: Function): void;
|
||||
(actual: Function, expected: string|RegExp, message?: string): void;
|
||||
(actual: Function, constructor: Error|Function, expected?: string|RegExp, message?: string): void;
|
||||
}
|
||||
|
||||
interface Assertion extends LanguageChains, NumericComparison, TypeComparison {
|
||||
not: Assertion;
|
||||
deep: Deep;
|
||||
@ -281,3 +302,7 @@ declare var chai: Chai.ChaiStatic;
|
||||
declare module "chai" {
|
||||
export = chai;
|
||||
}
|
||||
|
||||
interface Object {
|
||||
should: Chai.Assertion;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user