Skip to content

Commit c696f33

Browse files
committed
test: update handlePackage test to get info from db
1 parent f28b208 commit c696f33

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

lib/handlers/package/handle-package.test.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,17 @@ test("definitely typed", async () => {
7979
});
8080

8181
test("with api", async () => {
82-
const res = await handlePackage("[email protected]");
83-
expect(res).toMatchObject({
82+
const res1 = await handlePackage("[email protected]");
83+
expect(res1).toMatchObject({
84+
status: "pkg-has-api",
85+
pkgInfo: {
86+
87+
},
88+
});
89+
90+
// Get from DB.
91+
const res2 = await handlePackage("[email protected]");
92+
expect(res2).toMatchObject({
8493
status: "pkg-has-api",
8594
pkgInfo: {
8695

0 commit comments

Comments
 (0)