power-assert: Update APIs (#24578)

* Update APIs

* Update header
This commit is contained in:
falsandtru
2018-04-11 02:16:16 +09:00
committed by Mohamed Hegazy
parent 5193c7c6ed
commit b24419795d
2 changed files with 9 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
// Type definitions for power-assert 1.4.1
// Type definitions for power-assert 1.5.0
// Project: https://github.com/twada/power-assert
// Definitions by: vvakame <https://github.com/vvakame>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -62,6 +62,8 @@ declare namespace assert {
export function ifError(value:any):void;
export const strict: typeof assert;
export interface Options {
assertion?: empower.Options;
output?: powerAssertFormatter.Options;

View File

@@ -1,5 +1,3 @@
import assert = require("power-assert");
assert(1 + 1 - 2 === 0, "The universe isn't how it should.");
@@ -16,13 +14,13 @@ assert.notDeepStrictEqual([{a:1}], [{a:1}], "uses === comparator");
assert.throws(() => {
throw "a hammer at your face";
}, undefined, "DODGED IT");
}, "DODGED IT");
assert.doesNotThrow(() => {
if (!!false) {
throw "a hammer at your face";
}
}, undefined, "What the...*crunch*");
}, "What the...*crunch*");
var customizedAssert1 = assert.customize({
@@ -41,13 +39,13 @@ customizedAssert1.notStrictEqual(2, "2", "uses === comparator");
customizedAssert1.throws(() => {
throw "a hammer at your face";
}, undefined, "DODGED IT");
}, "DODGED IT");
customizedAssert1.doesNotThrow(() => {
if (!!false) {
throw "a hammer at your face";
}
}, undefined, "What the...*crunch*");
}, "What the...*crunch*");
var customizedAssert2 = assert.customize({
@@ -85,3 +83,5 @@ var customizedAssert2 = assert.customize({
]
}
});
(): typeof assert => assert.strict;