mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 04:01:52 +00:00
Unwrap all lone ambient external modules
This commit is contained in:
Vendored
+50
-51
@@ -5,62 +5,61 @@
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/nodeunit.d.ts
|
||||
|
||||
declare module 'nodeunit' {
|
||||
export interface ITestCase {
|
||||
(testCase: {[property: string]: ITestBody | ITestGroup | void}) : void;
|
||||
}
|
||||
export var testCase : ITestCase;
|
||||
|
||||
export interface Test {
|
||||
done: ICallbackFunction;
|
||||
expect(num: number): void;
|
||||
export interface ITestCase {
|
||||
(testCase: { [property: string]: ITestBody | ITestGroup | void }): void;
|
||||
}
|
||||
declare export var testCase: ITestCase;
|
||||
|
||||
//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;
|
||||
export interface Test {
|
||||
done: ICallbackFunction;
|
||||
expect(num: number): void;
|
||||
|
||||
//assertion wrappers
|
||||
equals(actual: any, expected: any, message?: string): void;
|
||||
same(actual: any, expected: any, message?: string): 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;
|
||||
|
||||
// Test Group Usage:
|
||||
// var testGroup: nodeunit.ITestGroup = {
|
||||
// setUp: (callback) => {
|
||||
// callback();
|
||||
// },
|
||||
// tearDown: (callback) => {
|
||||
// callback();
|
||||
// },
|
||||
// test1: (test: nodeunit.Test) => {
|
||||
// test.done();
|
||||
// }
|
||||
// }
|
||||
// exports.testgroup = testGroup;
|
||||
//assertion wrappers
|
||||
equals(actual: any, expected: any, message?: string): void;
|
||||
same(actual: any, expected: any, message?: string): void;
|
||||
}
|
||||
|
||||
export interface ITestBody {
|
||||
(callback: Test): void;
|
||||
}
|
||||
// Test Group Usage:
|
||||
// var testGroup: nodeunit.ITestGroup = {
|
||||
// setUp: (callback) => {
|
||||
// callback();
|
||||
// },
|
||||
// tearDown: (callback) => {
|
||||
// callback();
|
||||
// },
|
||||
// test1: (test: nodeunit.Test) => {
|
||||
// test.done();
|
||||
// }
|
||||
// }
|
||||
// exports.testgroup = testGroup;
|
||||
|
||||
export interface ITestGroup {
|
||||
/** The setUp function is run before each test */
|
||||
setUp?: (callback: ICallbackFunction) => void;
|
||||
/** The tearDown function is run after each test calls test.done() */
|
||||
tearDown?: (callback: ICallbackFunction) => void;
|
||||
[property: string] : ITestGroup | ITestBody | ((callback: ICallbackFunction) => void);
|
||||
}
|
||||
export interface ITestBody {
|
||||
(callback: Test): void;
|
||||
}
|
||||
|
||||
export interface ICallbackFunction {
|
||||
(err?: any): void;
|
||||
}
|
||||
export interface ITestGroup {
|
||||
/** The setUp function is run before each test */
|
||||
setUp?: (callback: ICallbackFunction) => void;
|
||||
/** The tearDown function is run after each test calls test.done() */
|
||||
tearDown?: (callback: ICallbackFunction) => void;
|
||||
[property: string]: ITestGroup | ITestBody | ((callback: ICallbackFunction) => void);
|
||||
}
|
||||
|
||||
export interface ICallbackFunction {
|
||||
(err?: any): void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user