mirror of
https://github.com/grpc/grpc-node.git
synced 2025-12-08 18:23:54 +00:00
* Add ChannelCredential tests * Work on channel credentials * Remove context.context checks * Make call credentials an interface * Write comments for call credentials * fixtures comment in test-channel-credentials * small changes * Address name change comment * define metadata interface * Call credentials * Reorganize channel-credentials file * Composed call credentials tests * Simplified CallCredentials composition * Use async.parallel in call-credentials
17 lines
337 B
TypeScript
17 lines
337 B
TypeScript
import * as assert from 'assert';
|
|
|
|
export function mockFunction(): never {
|
|
throw new Error('Not implemented');
|
|
}
|
|
|
|
export namespace assert2 {
|
|
export function noThrowAndReturn<T>(fn: () => T): T {
|
|
try {
|
|
return fn();
|
|
} catch (e) {
|
|
assert.throws(() => { throw e });
|
|
throw e; // for type safety only
|
|
}
|
|
}
|
|
}
|