Update stuff so we can pass build hopefully
Build and Push Next App / quality (push) Failing after 39s
Build and Push Next App / build-next (push) Has been skipped

This commit is contained in:
Gabriel Brown
2026-06-21 21:48:03 -05:00
parent 97d29200d3
commit c33d3cc02d
8 changed files with 94 additions and 125 deletions
+1
View File
@@ -17,6 +17,7 @@
"dev:tunnel": "bun sync-env && bun with-env convex dev",
"dev:web": "bun sync-env && bun with-env convex dev",
"setup": "bun sync-env && bun with-env convex dev --until-success",
"codegen": "convex codegen --typecheck disable",
"clean": "git clean -xdf .cache .turbo dist node_modules",
"format": "prettier --check . --ignore-path ../../.gitignore",
"lint": "eslint --flag unstable_native_nodejs_ts_config",
+10 -18
View File
@@ -1,17 +1,9 @@
import { convexTest } from 'convex-test';
import { makeFunctionReference } from 'convex/server';
import { describe, expect, test } from 'vitest';
import { api } from '../../convex/_generated/api.js';
import schema from '../../convex/schema';
const createManualSpoon = makeFunctionReference<'mutation'>(
'spoons:createManual',
);
const listMySpoons = makeFunctionReference<'query'>('spoons:listMine');
const getSpoon = makeFunctionReference<'query'>('spoons:get');
const createAgentRequest = makeFunctionReference<'mutation'>(
'agentRequests:create',
);
const modules = import.meta.glob('../../convex/**/*.*s');
const createUser = async (t: ReturnType<typeof convexTest>, email: string) =>
@@ -49,9 +41,9 @@ describe('convex-test harness', () => {
test('requires authentication to create a Spoon', async () => {
const t = convexTest(schema, modules);
await expect(t.mutation(createManualSpoon, spoonInput)).rejects.toThrow(
'Not authenticated.',
);
await expect(
t.mutation(api.spoons.createManual, spoonInput),
).rejects.toThrow('Not authenticated.');
});
test('creates and lists Spoons for the current user', async () => {
@@ -59,8 +51,8 @@ describe('convex-test harness', () => {
const userId = await createUser(t, 'one@example.com');
const session = authed(t, userId);
const spoonId = await session.mutation(createManualSpoon, spoonInput);
const spoons = await session.query(listMySpoons, {});
const spoonId = await session.mutation(api.spoons.createManual, spoonInput);
const spoons = await session.query(api.spoons.listMine, {});
expect(spoons).toHaveLength(1);
expect(spoons[0]?._id).toBe(spoonId);
@@ -72,12 +64,12 @@ describe('convex-test harness', () => {
const ownerId = await createUser(t, 'owner@example.com');
const otherId = await createUser(t, 'other@example.com');
const spoonId = await authed(t, ownerId).mutation(
createManualSpoon,
api.spoons.createManual,
spoonInput,
);
await expect(
authed(t, otherId).query(getSpoon, { spoonId }),
authed(t, otherId).query(api.spoons.get, { spoonId }),
).rejects.toThrow('Spoon not found.');
});
@@ -86,12 +78,12 @@ describe('convex-test harness', () => {
const ownerId = await createUser(t, 'owner@example.com');
const otherId = await createUser(t, 'other@example.com');
const spoonId = await authed(t, ownerId).mutation(
createManualSpoon,
api.spoons.createManual,
spoonInput,
);
await expect(
authed(t, otherId).mutation(createAgentRequest, {
authed(t, otherId).mutation(api.agentRequests.create, {
spoonId,
prompt: 'Add a settings page',
}),