chore: Update Vitest async test expectations and remove unused dependencies.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user