Skip to content

Commit

Permalink
add 11-fetch in tests.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
dynamite-bud committed Nov 22, 2023
1 parent bd9ef98 commit 7a8674d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test-suite/js-test-app/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
handleTextDecoder7,
handleURL8,
handleAtobBtoA9,
handleFetch,
} from "./test-files/index.js";

function router(req) {
Expand Down Expand Up @@ -41,7 +42,10 @@ function router(req) {
if (path.startsWith("/10-atob-btoa")) {
return handleAtobBtoA9(req);
}
return new Response("Route Not Found", { status: 404 });
if (path.startsWith("/11-fetch")) {
return handleFetch(req);
}
return new Response(`Route Not Found ${path}`, { status: 404 });
}

addEventListener("fetch", (fetchEvent) => {
Expand Down
6 changes: 6 additions & 0 deletions test-suite/tests/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,9 @@ test_name = "10-atob-btoa"
test_route = "10-atob-btoa"
expected_output = "All Tests Passed!"
expected_response_status = 200

[[test_cases]]
test_name = "11-fetch"
test_route = "11-fetch"
expected_output = "All tests passed!"
expected_response_status = 200

0 comments on commit 7a8674d

Please sign in to comment.