UNPKG

569 BJavaScriptView Raw
1import Voice from "../lib/Voice";
2
3import NexmoStub from "./NexmoStub";
4
5var voiceAPIs = {
6 sendTTSMessage: "sendTTSMessage",
7 sendTTSPromptWithCapture: "sendTTSPromptWithCapture",
8 sendTTSPromptWithConfirm: "sendTTSPromptWithConfirm",
9 call: "call"
10};
11
12describe("Voice Object", function() {
13 it("should implement all v1 APIs", function() {
14 NexmoStub.checkAllFunctionsAreDefined(voiceAPIs, Voice);
15 });
16
17 it("should proxy the function call to the underlying `nexmo` object", function() {
18 NexmoStub.checkAllFunctionsAreCalled(voiceAPIs, Voice);
19 });
20});