-
Trying to run my workers through a test workflow in CI using GitHub Actions with
My action looks like: name: CI
on: push
jobs:
ci:
name: Continuous Integration
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
registry-url: "https://npm.jsr.io"
bun-version: canary
- name: Install dependencies
run: bun install
- name: Run tests
run: bun test
And the test failing: import { SELF } from "cloudflare:test";
import { expect, it } from "vitest";
it("dispatches fetch event", async () => {
const response = await SELF.fetch("https://example.com/index.html");
expect(response.status).toBe(200);
expect(await response.text()).toContain("<!doctype html>");
}); Which can be reproduced by cloning this template repository and attempting to run tests in a GitHub action workflow: Am I missing something obvious related to the ambient type declaration? Mine looks like: declare module "cloudflare:test" {
export * from "@cloudflare/workers-types/experimental";
export * from "@cloudflare/vitest-pool-workers";
export interface ProvidedEnv extends Env {}
} Thanks in advance for any help anyone has! |
Beta Was this translation helpful? Give feedback.
Answered by
vhscom
Jan 30, 2025
Replies: 1 comment
-
Closing as I opened a bug #7969 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
vhscom
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Closing as I opened a bug #7969