Skip to content

Commit 595310f

Browse files
committed
test: add test on real async method instead of a mock one
1 parent 7d8c0ac commit 595310f

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

test/node/application-async-methods.js

+2-9
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,10 @@ const jstp = require('../..');
66

77
const app = require('../fixtures/application');
88

9-
const makeFakeAsyncFn = fn => {
10-
fn[Symbol.toStringTag] = 'AsyncFunction';
11-
return fn;
12-
};
13-
149
const application = new jstp.Application(app.name, {
1510
someInterface: {
16-
getSessionId: makeFakeAsyncFn(connection =>
17-
Promise.resolve(connection.session.id)
18-
),
19-
sum: makeFakeAsyncFn((connection, a, b) => Promise.resolve(a + b)),
11+
getSessionId: async connection => connection.session.id,
12+
sum: async (connection, a, b) => a + b,
2013
},
2114
});
2215
const server = jstp.net.createServer([application]);

0 commit comments

Comments
 (0)