feat: add convex state functions for snapshot persistence
This commit is contained in:
14
test/convex-functions.test.js
Normal file
14
test/convex-functions.test.js
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
const test = require("node:test");
|
||||
const assert = require("node:assert/strict");
|
||||
const fs = require("node:fs");
|
||||
|
||||
test("convex state functions are present for configured function names", () => {
|
||||
const schema = fs.readFileSync("convex/schema.ts", "utf8");
|
||||
const state = fs.readFileSync("convex/state.ts", "utf8");
|
||||
|
||||
assert.match(schema, /state_snapshots/);
|
||||
assert.match(state, /export const getLatestSnapshot = query/);
|
||||
assert.match(state, /export const saveSnapshot = mutation/);
|
||||
});
|
||||
Reference in New Issue
Block a user