summaryrefslogtreecommitdiff
path: root/tests/js
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-03-01 17:09:19 -0300
committerEuAndreh <eu@euandre.org>2024-03-01 17:09:19 -0300
commita31b96b8c8497c15112b41eaa41f850835d85e48 (patch)
tree79054d3d307e7bef0c210ca64388dbd50327fb69 /tests/js
parentsrc/hero.mjs: Add actionsFn() and lineHandlerFn() (diff)
downloadpapod-a31b96b8c8497c15112b41eaa41f850835d85e48.tar.gz
papod-a31b96b8c8497c15112b41eaa41f850835d85e48.tar.xz
src/hero.mjs: Add app name as first argument to buildServer()
Diffstat (limited to 'tests/js')
-rw-r--r--tests/js/hero.mjs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/js/hero.mjs b/tests/js/hero.mjs
index 51fa84a..23e4b7a 100644
--- a/tests/js/hero.mjs
+++ b/tests/js/hero.mjs
@@ -1374,7 +1374,7 @@ const test_promisifyServer = t => {
t.start("promisifyServer()");
t.test("we can access the underlying server ref", () => {
- const server = promisifyServer(http.createServer(() => {}));
+ const server = promisifyServer("app-name", http.createServer(() => {}));
assert.ok(server.ref instanceof http.Server);
});
};
@@ -1402,7 +1402,7 @@ const test_buildServer = t => {
t.test("empty values", async () => {
const socketPath = "./tests/hero-0.sock";
- const server = buildServer([]);
+ const server = buildServer("my app", []);
await server.listen(socketPath);
const response = await socketRequest(socketPath, "/anything");
@@ -1415,7 +1415,7 @@ const test_buildServer = t => {
const socketPath = "./tests/hero-1.sock";
const pathHandler = req => ({ status: 200, body: "OK" });
const routes = [ [ "GET", "/path", pathHandler ] ];
- const server = buildServer(routes, defaultInterceptors);
+ const server = buildServer("the-app", routes, defaultInterceptors);
await server.listen(socketPath);
const response = await socketRequest(socketPath, "/path");