Skip to content

Commit 4f390eb

Browse files
committed
update test config
1 parent 5fb658a commit 4f390eb

File tree

6 files changed

+62
-11
lines changed

6 files changed

+62
-11
lines changed

package-lock.json

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"convex": "^1.24.8"
6464
},
6565
"devDependencies": {
66+
"@edge-runtime/vm": "^5.0.0",
6667
"@eslint/eslintrc": "^3.3.1",
6768
"@eslint/js": "^9.38.0",
6869
"@types/node": "20.19.24",

src/client/index.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
import {
44
createFunctionHandle,
5-
Expand,
6-
FunctionHandle,
7-
FunctionReference,
8-
FunctionType,
9-
GenericActionCtx,
10-
GenericDataModel,
11-
GenericQueryCtx,
5+
type Expand,
6+
type FunctionHandle,
7+
type FunctionReference,
8+
type FunctionType,
9+
type GenericActionCtx,
10+
type GenericDataModel,
11+
type GenericQueryCtx,
1212
httpActionGeneric,
1313
HttpRouter,
1414
} from "convex/server";
15-
import { Infer } from "convex/values";
15+
import type { Infer } from "convex/values";
1616
import schema from "../component/schema.js";
1717
import type { ComponentApi } from "../component/_generated/component.js";
1818

src/component/messages.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { v, VString } from "convex/values";
1+
import { v, type VString } from "convex/values";
22
import {
33
action,
44
internalMutation,
@@ -8,13 +8,13 @@ import {
88
import { internal } from "./_generated/api.js";
99
import { twilioRequest } from "./utils.js";
1010
import schema from "./schema.js";
11-
import {
11+
import type {
1212
FunctionHandle,
1313
NamedTableInfo,
1414
Query,
1515
WithoutSystemFields,
1616
} from "convex/server";
17-
import { DataModel, Doc } from "./_generated/dataModel.js";
17+
import type { DataModel, Doc } from "./_generated/dataModel.js";
1818

1919
export type Message = WithoutSystemFields<Doc<"messages">>;
2020
const callbackValidator = v.string() as VString<

tsconfig.test.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"include": [
4+
"src/**/*.ts",
5+
"src/**/*.tsx",
6+
"example/src/**/*.ts",
7+
"example/src/**/*.tsx",
8+
"example/convex/**/*.ts"
9+
],
10+
"exclude": [
11+
"node_modules",
12+
"dist",
13+
"**/_generated"
14+
]
15+
}

vitest.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { defineConfig } from "vitest/config";
2+
3+
export default defineConfig({
4+
test: {
5+
environment: "edge-runtime",
6+
typecheck: {
7+
tsconfig: "./tsconfig.test.json",
8+
},
9+
},
10+
});

0 commit comments

Comments
 (0)