mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
fixup tests
Note that these tests aren’t currently passing on master either; the last PR only passed because travis didn’t actually run the tests: https://travis-ci.org/DefinitelyTyped/DefinitelyTyped/builds/160110579
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import * as twilio from './twilio';
|
||||
import * as Express from "express";
|
||||
|
||||
// Examples taken from https://twilio.github.io/twilio-node/ (v2.1.0)
|
||||
|
||||
@@ -227,8 +228,12 @@ var token = capability.generate(120);
|
||||
|
||||
/// Utilities
|
||||
twilio.validateRequest(token, str, 'http://example.herokuapp.com', { query: 'val' });
|
||||
twilio.validateExpressRequest({}, 'YOUR_TWILIO_AUTH_TOKEN');
|
||||
twilio.validateExpressRequest({}, 'YOUR_TWILIO_AUTH_TOKEN', {});
|
||||
twilio.validateExpressRequest(getMockExpressRequest(), 'YOUR_TWILIO_AUTH_TOKEN');
|
||||
twilio.validateExpressRequest(getMockExpressRequest(), 'YOUR_TWILIO_AUTH_TOKEN', {});
|
||||
twilio.webhook({ validate: false });
|
||||
twilio.webhook("MYAUTHTOKEN", { validate: false });
|
||||
|
||||
|
||||
function getMockExpressRequest(): Express.Request {
|
||||
return <Express.Request>JSON.parse("{}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user