Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions lib/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,11 @@ export class Session {

async call(
procedure: string,
callOptions: {
args?: any[] | null,
kwargs?: { [key: string]: any } | null,
options?: { [key: string]: any } | null
} = {}
args?: any[] | null,
kwargs?: { [key: string]: any } | null,
options?: { [key: string]: any } | null
): Promise<Result> {
const call = new Call(
new CallFields(this._nextID, procedure, callOptions.args, callOptions.kwargs, callOptions.options)
);
const call = new Call(new CallFields(this._nextID, procedure, args, kwargs, options));

let promiseHandler: {
resolve: (value: Result | PromiseLike<Result>) => void;
Expand Down
4 changes: 2 additions & 2 deletions tests/interoptests/interop.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe("WAMP Tests", function () {
const client = new Client({authenticator, serializer});
const session = await client.connect(url, REALM);

const result = await session.call(PROCEDURE_ADD, {"args": [2, 2]});
const result = await session.call(PROCEDURE_ADD, [2, 2]);
expect(result.args[0]).toBe(4);

await session.close();
Expand Down Expand Up @@ -82,7 +82,7 @@ describe("WAMP Tests", function () {
await callee.register("io.xconn.test", invHandler);

const caller = await client.connect(url, REALM);
const result = await caller.call("io.xconn.test", {"args": args});
const result = await caller.call("io.xconn.test", args);
expect(result.args).toEqual(args);

await callee.close();
Expand Down