fix(modules-sdk): Remote Query "order" as config options (#6925)

This commit is contained in:
Carlos R. L. Rodrigues
2024-04-08 08:17:53 +02:00
committed by GitHub
parent 4f88743591
commit dd35a4dbff
8 changed files with 93 additions and 40 deletions
@@ -1,5 +1,5 @@
import { createAdminUser } from "../../../../helpers/create-admin-user"
import { medusaIntegrationTestRunner } from "medusa-test-utils"
import { createAdminUser } from "../../../../helpers/create-admin-user"
jest.setTimeout(50000)
@@ -41,6 +41,18 @@ medusaIntegrationTestRunner({
listResp.data.currencies.find((c) => c.code === "aud")
)
})
it("should correctly list currencies in the correct order", async () => {
const listResp = await api.get(
"/admin/currencies?order=-code",
adminHeaders
)
const first = listResp.data.currencies.shift()
expect(first).toEqual(
expect.objectContaining({ code: "zwl", name: "Zimbabwean Dollar" })
)
})
})
},
})