fix: try to better handle directories and loading handlers both locally
and remotely
This commit is contained in:
parent
5d25afc329
commit
5ee654f280
3 changed files with 10 additions and 8 deletions
|
@ -16,13 +16,12 @@ Deno.test({
|
|||
const old_handlers: string | undefined = Deno.env.get('SERVERUS_HANDLERS');
|
||||
|
||||
try {
|
||||
Deno.chdir('./tests/www');
|
||||
Deno.env.set(
|
||||
'SERVERUS_HANDLERS',
|
||||
`${path.join(path.dirname(path.resolve(path.fromFileUrl(import.meta.url))), 'handlers')}${
|
||||
old_handlers ? (';' + old_handlers) : ''
|
||||
}`
|
||||
`${import.meta.resolve('./handlers')}${old_handlers ? (';' + old_handlers) : ''}`
|
||||
);
|
||||
|
||||
Deno.chdir('./tests/www');
|
||||
test_server_info = await get_ephemeral_listen_server();
|
||||
|
||||
const response = await fetch(`http://${test_server_info.hostname}:${test_server_info.port}/echo/hello_world.foo`, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue