mirror of
https://github.com/andwati/order-service.git
synced 2026-11-27 19:38:46 +00:00
fix build error
This commit is contained in:
@@ -42,6 +42,7 @@ describe("OrderService", () => {
|
|||||||
describe("listOrders", () => {
|
describe("listOrders", () => {
|
||||||
it("lists all orders for admin role", async () => {
|
it("lists all orders for admin role", async () => {
|
||||||
const orders = [{ id: "1" }];
|
const orders = [{ id: "1" }];
|
||||||
|
// @ts-ignore
|
||||||
mockedOrderRepo.findAll.mockResolvedValueOnce(orders as never);
|
mockedOrderRepo.findAll.mockResolvedValueOnce(orders as never);
|
||||||
|
|
||||||
const result = await OrderService.listOrders("user-id", "admin");
|
const result = await OrderService.listOrders("user-id", "admin");
|
||||||
@@ -52,6 +53,7 @@ describe("OrderService", () => {
|
|||||||
|
|
||||||
it("lists user orders for non-admin role", async () => {
|
it("lists user orders for non-admin role", async () => {
|
||||||
const orders = [{ id: "2" }];
|
const orders = [{ id: "2" }];
|
||||||
|
// @ts-ignore
|
||||||
mockedOrderRepo.findByUser.mockResolvedValueOnce(orders as never);
|
mockedOrderRepo.findByUser.mockResolvedValueOnce(orders as never);
|
||||||
|
|
||||||
const result = await OrderService.listOrders("user-123", "customer");
|
const result = await OrderService.listOrders("user-123", "customer");
|
||||||
|
|||||||
Reference in New Issue
Block a user