chore: Update Vitest async test expectations and remove unused dependencies.
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@consumet/extensions": "github:consumet/consumet.ts#3dd0ccb",
|
||||
"@haverstack/axios-fetch-adapter": "^0.12.0",
|
||||
"@hono/swagger-ui": "^0.5.1",
|
||||
"@hono/zod-openapi": "^0.19.5",
|
||||
"@hono/zod-validator": "^0.2.2",
|
||||
@@ -35,7 +34,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@cloudflare/vitest-pool-workers": "^0.10.15",
|
||||
"@cloudflare/workers-types": "^4.20250423.0",
|
||||
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
||||
"@types/lodash.isequal": "^4.5.8",
|
||||
"@types/lodash.mapkeys": "^4.6.9",
|
||||
|
||||
1513
pnpm-lock.yaml
generated
1513
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,6 @@ describe("Health Check", () => {
|
||||
it("should return { success: true }", async () => {
|
||||
const res = await app.request("/");
|
||||
|
||||
expect(res.json()).resolves.toEqual({ success: true });
|
||||
await expect(res.json()).resolves.toEqual({ success: true });
|
||||
});
|
||||
});
|
||||
|
||||
@@ -44,7 +44,7 @@ describe("requests the /token route", () => {
|
||||
body: JSON.stringify({ token: "123", deviceId: "123" }),
|
||||
});
|
||||
|
||||
expect(res.json()).resolves.toEqual({ success: true });
|
||||
await expect(res.json()).resolves.toEqual({ success: true });
|
||||
expect(res.status).toBe(200);
|
||||
});
|
||||
|
||||
@@ -91,7 +91,7 @@ describe("requests the /token route", () => {
|
||||
body: JSON.stringify({ token: "124", deviceId: "123" }),
|
||||
});
|
||||
|
||||
expect(res.json()).resolves.toEqual({ success: true });
|
||||
await expect(res.json()).resolves.toEqual({ success: true });
|
||||
expect(res.status).toBe(200);
|
||||
});
|
||||
|
||||
@@ -161,7 +161,7 @@ describe("requests the /token route", () => {
|
||||
body: JSON.stringify({ token: "123", deviceId: "124" }),
|
||||
});
|
||||
|
||||
expect(res.json()).resolves.toEqual({ success: false });
|
||||
await expect(res.json()).resolves.toEqual({ success: false });
|
||||
expect(res.status).toBe(401);
|
||||
});
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ describe("requests the /watch-status route", () => {
|
||||
env,
|
||||
);
|
||||
|
||||
expect(res.json()).resolves.toEqual({ success: true });
|
||||
await expect(res.json()).resolves.toEqual({ success: true });
|
||||
expect(res.status).toBe(200);
|
||||
expect(removeTask).toHaveBeenCalled();
|
||||
});
|
||||
@@ -188,7 +188,7 @@ describe("requests the /watch-status route", () => {
|
||||
env,
|
||||
);
|
||||
|
||||
expect(res.json()).resolves.toEqual({ success: true });
|
||||
await expect(res.json()).resolves.toEqual({ success: true });
|
||||
expect(res.status).toBe(200);
|
||||
});
|
||||
|
||||
@@ -214,7 +214,7 @@ describe("requests the /watch-status route", () => {
|
||||
env,
|
||||
);
|
||||
|
||||
expect(res.json()).resolves.toEqual({ success: true });
|
||||
await expect(res.json()).resolves.toEqual({ success: true });
|
||||
expect(res.status).toBe(200);
|
||||
});
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ import { describe, expect, it } from "vitest";
|
||||
import { PromiseTimedOutError, promiseTimeout } from "./promiseTimeout";
|
||||
|
||||
describe("promiseTimeout", () => {
|
||||
it("promise resolves within timeout, returns value", () => {
|
||||
expect(
|
||||
it("promise resolves within timeout, returns value", async () => {
|
||||
await expect(
|
||||
promiseTimeout(
|
||||
wait(1).then(() => 2),
|
||||
10,
|
||||
@@ -12,8 +12,8 @@ describe("promiseTimeout", () => {
|
||||
).resolves.toBe(2);
|
||||
});
|
||||
|
||||
it("promise does not resolve within timeout, throws PromiseTimedOutError", () => {
|
||||
expect(
|
||||
it("promise does not resolve within timeout, throws PromiseTimedOutError", async () => {
|
||||
await expect(
|
||||
promiseTimeout(
|
||||
wait(2).then(() => 2),
|
||||
1,
|
||||
|
||||
@@ -17,7 +17,6 @@ export default defineWorkersProject(async () => {
|
||||
},
|
||||
poolOptions: {
|
||||
workers: {
|
||||
// singleWorker: true,
|
||||
wrangler: {
|
||||
configPath: "./wrangler.toml",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user