File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
miniflare/test/plugins/d1 Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 11import { setupTest } from "./test" ;
22import type {
33 D1Database ,
4+ D1DatabaseSession ,
45 D1ExecResult ,
56 D1PreparedStatement ,
67 D1Result ,
8+ D1SessionBookmark ,
9+ D1SessionConstraint ,
710} from "@cloudflare/workers-types/experimental" ;
811import type { Miniflare } from "miniflare" ;
912
@@ -42,6 +45,13 @@ export class TestD1Database implements D1Database {
4245 async exec ( query : string ) : Promise < D1ExecResult > {
4346 return this [ kSend ] ( "/exec" , query ) ;
4447 }
48+
49+ withSession (
50+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
51+ constraintOrBookmark ?: D1SessionBookmark | D1SessionConstraint
52+ ) : D1DatabaseSession {
53+ throw new Error ( "Method not implemented for D1 Wrangler shim." ) ;
54+ }
4555}
4656
4757class TestD1PreparedStatement implements D1PreparedStatement {
Original file line number Diff line number Diff line change @@ -65,6 +65,11 @@ export class WorkflowBinding extends WorkerEntrypoint<Env> implements Workflow {
6565 status : handle . status . bind ( handle ) ,
6666 } ;
6767 }
68+ public async createBatch (
69+ _batch : WorkflowInstanceCreateOptions < unknown > [ ]
70+ ) : Promise < WorkflowInstance [ ] > {
71+ throw new Error ( "createBatch is not yet implemented in local development." ) ;
72+ }
6873}
6974
7075export class WorkflowHandle extends RpcTarget implements WorkflowInstance {
You can’t perform that action at this time.
0 commit comments