File
Blob: src/workerd/server/tests/python/undefined-handler/server.mjs
| 1 | // Copyright (c) 2025 Cloudflare, Inc. |
| 2 | // Licensed under the Apache 2.0 license found in the LICENSE file or at: |
| 3 | // https://opensource.org/licenses/Apache-2.0 |
| 4 | import { rejects } from 'node:assert'; |
| 5 | |
| 6 | export default { |
| 7 | async test(ctrl, env) { |
| 8 | await rejects(env.pythonWorker.fetch(new Request('http://example.com')), { |
| 9 | name: 'Error', |
| 10 | message: |
| 11 | 'Python entrypoint "undefined_handler.py" does not export a handler named "on_fetch"', |
| 12 | }); |
| 13 | }, |
| 14 | }; |