Skip to content

Commit

Permalink
test: enable cloudflare-r2-binding tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Dec 10, 2024
1 parent fb8e00e commit 0c4d9fd
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions test/drivers/cloudflare-r2-binding.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import CloudflareR2Binding from "../../src/drivers/cloudflare-r2-binding";
import { testDriver } from "./utils";
import { getPlatformProxy } from "wrangler";

describe.skip("drivers: cloudflare-r2-binding", async () => {
describe("drivers: cloudflare-r2-binding", async () => {
const cfProxy = await getPlatformProxy();
globalThis.__env__ = cfProxy.env;
afterAll(async () => {
Expand All @@ -20,9 +20,16 @@ describe.skip("drivers: cloudflare-r2-binding", async () => {
const storage = createStorage({
driver: CloudflareR2Binding({}),
});
expect(await snapshot(storage, "")).toMatchInlineSnapshot(`

const storageSnapshot = await snapshot(storage, "");

storageSnapshot["base:data:raw.bin"] = (await storage.getItemRaw(
"base:data:raw.bin"
)) as any;

expect(storageSnapshot).toMatchInlineSnapshot(`
{
"base:data:raw.bin": Uint8Array [
"base:data:raw.bin": ArrayBuffer [
1,
2,
3,
Expand Down

0 comments on commit 0c4d9fd

Please sign in to comment.