fix: better handling of .spa file being in the root, improved code

path
This commit is contained in:
Andy Burke 2025-11-20 16:56:40 -08:00
parent 474d455986
commit 1220f1a370
3 changed files with 11 additions and 15 deletions

View file

@ -14,11 +14,11 @@ Deno.test({
const cwd = Deno.cwd();
try {
Deno.chdir('./tests/www');
Deno.chdir('./tests/www/spa');
test_server_info = await get_ephemeral_listen_server();
{
const response = await fetch(`http://${test_server_info.hostname}:${test_server_info.port}/spa/foo/bar/baz`, {
const response = await fetch(`http://${test_server_info.hostname}:${test_server_info.port}/foo/bar/baz`, {
method: 'GET'
});
@ -30,7 +30,7 @@ Deno.test({
}
{
const response = await fetch(`http://${test_server_info.hostname}:${test_server_info.port}/spa/testing`, {
const response = await fetch(`http://${test_server_info.hostname}:${test_server_info.port}/testing`, {
method: 'GET'
});
@ -42,7 +42,7 @@ Deno.test({
}
{
const response = await fetch(`http://${test_server_info.hostname}:${test_server_info.port}/spa/testing/blah.html`, {
const response = await fetch(`http://${test_server_info.hostname}:${test_server_info.port}/testing/blah.html`, {
method: 'GET'
});