Skip to content

Commit

Permalink
refactor the tests into two suites - existing default and one with Se…
Browse files Browse the repository at this point in the history
…ssions enabled
  • Loading branch information
lambrospetrou committed Sep 2, 2024
1 parent eadfe5e commit 106f99d
Show file tree
Hide file tree
Showing 7 changed files with 754 additions and 678 deletions.
4 changes: 2 additions & 2 deletions src/cloudflare/internal/d1-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ type ResultsFormat = 'ARRAY_OF_OBJECTS' | 'ROWS_AND_COLUMNS' | 'NONE';

type D1SessionCommitTokenOrConstraint = string;
type D1SessionCommitToken = string;
const D1_SESSION_CONSTRAINT_FIRST_PRIMARY = "first-primary";
const D1_SESSION_CONSTRAINT_FIRST_UNCONSTRAINED = "first-unconstrained";
const D1_SESSION_CONSTRAINT_FIRST_PRIMARY = 'first-primary';
const D1_SESSION_CONSTRAINT_FIRST_UNCONSTRAINED = 'first-unconstrained';

// TODO Figure out what header to use.
const D1_SESSION_COMMIT_TOKEN_HTTP_HEADER = 'x-cf-d1-session-commit-token';
Expand Down
9 changes: 9 additions & 0 deletions src/cloudflare/internal/test/d1/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ load("//:build/wd_test.bzl", "wd_test")
wd_test(
src = "d1-api-test.wd-test",
args = ["--experimental"],
data = glob(
["*.js"],
exclude=["d1-api-test-with-sessions.js"],
),
)

wd_test(
src = "d1-api-test-with-sessions.wd-test",
args = ["--experimental"],
data = glob(["*.js"]),
)

Expand Down
Loading

0 comments on commit 106f99d

Please sign in to comment.