feat(medusa,types): added buyget support for modules (#6159)

This commit is contained in:
Riqwan Thamir
2024-01-23 21:01:44 +01:00
committed by GitHub
parent 302323916b
commit 68d8daccd2
22 changed files with 1058 additions and 109 deletions
@@ -74,28 +74,30 @@ describe("GET /admin/promotions", () => {
)
expect(response.status).toEqual(200)
expect(response.data.promotion).toEqual({
id: expect.any(String),
code: "TEST",
campaign: null,
is_automatic: false,
type: "standard",
created_at: expect.any(String),
updated_at: expect.any(String),
deleted_at: null,
application_method: {
expect(response.data.promotion).toEqual(
expect.objectContaining({
id: expect.any(String),
promotion: expect.any(Object),
value: 100,
type: "fixed",
target_type: "order",
max_quantity: 0,
allocation: null,
code: "TEST",
campaign: null,
is_automatic: false,
type: "standard",
created_at: expect.any(String),
updated_at: expect.any(String),
deleted_at: null,
},
})
application_method: expect.objectContaining({
id: expect.any(String),
promotion: expect.any(Object),
value: 100,
type: "fixed",
target_type: "order",
max_quantity: 0,
allocation: null,
created_at: expect.any(String),
updated_at: expect.any(String),
deleted_at: null,
}),
})
)
})
it("should get the requested promotion with filtered fields and relations", async () => {