summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/js/hero.mjs10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/js/hero.mjs b/tests/js/hero.mjs
index d4c6b57..67cf690 100644
--- a/tests/js/hero.mjs
+++ b/tests/js/hero.mjs
@@ -1575,8 +1575,9 @@ const test_buildServer = async t => {
await t.test("empty values", async () => {
const socket = "tests/hero-4.socket";
const pipe = "tests/hero-4.pipe";
- const server = buildServer("my app", []);
- await server.listen(socket, pipe);
+ const name = "my-empty-app";
+ const server = buildServer({ name, socket, pipe });
+ await server.listen();
const response = await socketRequest(socket, "/anything");
await server.close();
@@ -1586,11 +1587,12 @@ const test_buildServer = async t => {
await t.test("integrated application server", async () => {
const socket = "tests/hero-5.socket";
const pipe = "tests/hero-5.pipe";
+ const name = "the-app";
const pathHandler = req => ({ status: 200, body: "something" });
const routes = [ [ "GET", "/path", pathHandler ] ];
- const server = buildServer("the-app", routes, defaultInterceptors);
+ const server = buildServer({ name, routes, socket, pipe });
- await server.listen(socket, pipe);
+ await server.listen();
const response = await socketRequest(socket, "/path");
await server.close();