fix: ensure includes are pulled in relative to their parent
This commit is contained in:
parent
0f65e57539
commit
02c10aaa72
8 changed files with 9 additions and 8 deletions
|
@ -17,7 +17,7 @@ Deno.test({
|
|||
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}/`, {
|
||||
const response = await fetch(`http://${test_server_info.hostname}:${test_server_info.port}/includes/index.html`, {
|
||||
method: 'GET'
|
||||
});
|
||||
|
||||
|
@ -36,7 +36,7 @@ Deno.test({
|
|||
});
|
||||
|
||||
Deno.test({
|
||||
name: 'get html file (text/plain)',
|
||||
name: 'get html file (text/plain) (also test automatic index.html)',
|
||||
permissions: {
|
||||
env: true,
|
||||
read: true,
|
||||
|
@ -51,7 +51,7 @@ Deno.test({
|
|||
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}/index.html`, {
|
||||
const response = await fetch(`http://${test_server_info.hostname}:${test_server_info.port}/includes`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Accept': 'text/plain'
|
||||
|
|
3
tests/www/includes/test_include.html
Normal file
3
tests/www/includes/test_include.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<div>Include #1</div>
|
||||
|
||||
<!-- #include file="./subdir/another_include.html" -->
|
|
@ -1,3 +0,0 @@
|
|||
<div>Include #1</div>
|
||||
|
||||
<!-- #include file="./another_include.html" -->
|
Loading…
Add table
Add a link
Reference in a new issue