Skip to content

Commit

Permalink
fix dev server start for custom elements redefine
Browse files Browse the repository at this point in the history
  • Loading branch information
dmail committed Aug 13, 2024
1 parent 4c4b91a commit f1c3c38
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { startDevServer } from "@jsenv/core";
import { jsenvPluginExplorer } from "@jsenv/plugin-explorer";

export const devServer = await startDevServer({
hostname: "127.0.0.1",
sourceDirectoryUrl: new URL("../src/", import.meta.url),
port: 3459,
clientAutoreload: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ await executeTestPlan({
},
},
webServer: {
origin: "http://localhost:3459",
origin: "http://127.0.0.1:3459",
moduleUrl: new URL("./dev.mjs", import.meta.url),
},
githubCheck: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const startServerUsingCommand = async (
if (timeoutAbortSource.signal.aborted) {
// aborted by timeout
throw new Error(
`"${webServer.command}" command did not start a server in less than ${allocatedMs}ms`,
`"${webServer.command}" command did not start a server at ${webServer.origin} in less than ${allocatedMs}ms`,
);
}
if (signal.aborted) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { fileURLToPath } from "node:url";
} catch (e) {
const actual = e;
const expect = new Error(
`"${webServer.command}" command did not start a server in less than 500ms`,
`"${webServer.command}" command did not start a server at http://localhost:3459 in less than 500ms`,
);
assert({ actual, expect });
}
Expand All @@ -43,7 +43,7 @@ import { fileURLToPath } from "node:url";
} catch (e) {
const actual = e;
const expect = new Error(
`"${webServer.command}" command did not start a server in less than 500ms`,
`"${webServer.command}" command did not start a server at http://localhost:3459 in less than 500ms`,
);
assert({ actual, expect });
}
Expand All @@ -68,7 +68,7 @@ import { fileURLToPath } from "node:url";
} catch (e) {
const actual = e;
const expect = new Error(
`"${webServer.command}" command did not start a server in less than 500ms`,
`"${webServer.command}" command did not start a server at http://localhost:3459 in less than 500ms`,
);
assert({ actual, expect });
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import { ensureWebServerIsStarted } from "@jsenv/test/src/execution/web_server_p
const actual = e.message;
const expect = `"node ${fileURLToPath(
webServer.moduleUrl,
)}" command did not start a server in less than 500ms`;
)}" command did not start a server at http://localhost:9961 in less than 500ms`;
assert({ actual, expect });
}
}
Expand All @@ -69,7 +69,7 @@ import { ensureWebServerIsStarted } from "@jsenv/test/src/execution/web_server_p
const expect = new Error(
`"node ${fileURLToPath(
webServer.moduleUrl,
)}" command did not start a server in less than 500ms`,
)}" command did not start a server at http://localhost:9962 in less than 500ms`,
);
assert({ actual, expect });
}
Expand Down

0 comments on commit f1c3c38

Please sign in to comment.