From 595310f71961fd5586d9dd67c8f3ed5196b62efa Mon Sep 17 00:00:00 2001 From: Mykola Bilochub Date: Wed, 15 May 2019 11:30:28 +0300 Subject: [PATCH] test: add test on real async method instead of a mock one --- test/node/application-async-methods.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/test/node/application-async-methods.js b/test/node/application-async-methods.js index 6df4e717..7cd34545 100644 --- a/test/node/application-async-methods.js +++ b/test/node/application-async-methods.js @@ -6,17 +6,10 @@ const jstp = require('../..'); const app = require('../fixtures/application'); -const makeFakeAsyncFn = fn => { - fn[Symbol.toStringTag] = 'AsyncFunction'; - return fn; -}; - const application = new jstp.Application(app.name, { someInterface: { - getSessionId: makeFakeAsyncFn(connection => - Promise.resolve(connection.session.id) - ), - sum: makeFakeAsyncFn((connection, a, b) => Promise.resolve(a + b)), + getSessionId: async connection => connection.session.id, + sum: async (connection, a, b) => a + b, }, }); const server = jstp.net.createServer([application]);