mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
imported 25 definitions from typescript-node-definitions
first batch: the easy pickings - as per https://github.com/borisyankov/DefinitelyTyped/issues/115 - added DT headers (scraped creators from git history) - added tests - some modifications - added CONTRIBUTORS.md for the substantial defs (>50 LOC)
This commit is contained in:
Vendored
+59
@@ -0,0 +1,59 @@
|
||||
// Type definitions for nodeunit
|
||||
// Project: https://github.com/caolan/nodeunit
|
||||
// Definitions by: Jeff Goddard <https://github.com/jedigo>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/nodeunit.d.ts
|
||||
|
||||
declare module 'nodeunit' {
|
||||
export interface Test {
|
||||
done: ICallbackFunction;
|
||||
expect(num: number): void;
|
||||
|
||||
//assersions from node assert module
|
||||
fail(actual: any, expected: any, message: string, operator: string): void;
|
||||
assert(value: any, message: string): void;
|
||||
ok(value: any, message?: string): void;
|
||||
equal(actual: any, expected: any, message?: string): void;
|
||||
notEqual(actual: any, expected: any, message?: string): void;
|
||||
deepEqual(actual: any, expected: any, message?: string): void;
|
||||
notDeepEqual(actual: any, expected: any, message?: string): void;
|
||||
strictEqual(actual: any, expected: any, message?: string): void;
|
||||
notStrictEqual(actual: any, expected: any, message?: string): void;
|
||||
throws(block: any, error?: any, message?: string): void;
|
||||
doesNotThrow(block: any, error?: any, message?: string): void;
|
||||
ifError(value: any): void;
|
||||
|
||||
//assertion wrappers
|
||||
equals(actual: any, expected: any, message?: string): void;
|
||||
same(actual: any, expected: any, message?: string): void;
|
||||
}
|
||||
|
||||
// Test Group Usage:
|
||||
// var testGroup: nodeunit.ITestGroup = {
|
||||
// setUp: function (callback: nodeunit.ICallbackFunction): void {
|
||||
// callback();
|
||||
// },
|
||||
// tearDown: function (callback: nodeunit.ICallbackFunction): void {
|
||||
// callback();
|
||||
// },
|
||||
// test1: function (test: nodeunit.Test): void {
|
||||
// test.done();
|
||||
// }
|
||||
// }
|
||||
// exports.testgroup = testGroup;
|
||||
|
||||
export interface ITestBody {
|
||||
(callback: Test): void;
|
||||
}
|
||||
|
||||
export interface ITestGroup {
|
||||
setUp?: (callback: ICallbackFunction) => void;
|
||||
tearDown?: (callback: ICallbackFunction) => void;
|
||||
}
|
||||
|
||||
export interface ICallbackFunction {
|
||||
(err?: any): void;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user