forked from Mike/freno-dev
fix: analytics and deprecated warning
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { describe, it, expect, vi } from "vitest";
|
||||
import { appRouter } from "~/server/api/root";
|
||||
import { createCallerFactory } from "~/server/api/root";
|
||||
import { createTRPCContext } from "~/server/api/utils";
|
||||
|
||||
// Mock the S3 client and getSignedUrl function
|
||||
@@ -33,9 +33,8 @@ process.env.VITE_DOWNLOAD_BUCKET_STRING = "test-bucket";
|
||||
|
||||
describe("downloads router", () => {
|
||||
it("should return a signed URL for valid asset names", async () => {
|
||||
const caller = appRouter.createCaller(
|
||||
await createTRPCContext({ nativeEvent: {} } as any)
|
||||
);
|
||||
const ctx = await createTRPCContext({ nativeEvent: {} } as any);
|
||||
const caller = createCallerFactory(ctx);
|
||||
|
||||
const result = await caller.downloads.getDownloadUrl.query({
|
||||
asset_name: "lineage"
|
||||
@@ -46,9 +45,8 @@ describe("downloads router", () => {
|
||||
});
|
||||
|
||||
it("should throw NOT_FOUND for invalid asset names", async () => {
|
||||
const caller = appRouter.createCaller(
|
||||
await createTRPCContext({ nativeEvent: {} } as any)
|
||||
);
|
||||
const ctx = await createTRPCContext({ nativeEvent: {} } as any);
|
||||
const caller = createCallerFactory(ctx);
|
||||
|
||||
try {
|
||||
await caller.downloads.getDownloadUrl.query({
|
||||
|
||||
Reference in New Issue
Block a user