feat(utils,types,framework,medusa): store endpoints should require publishable key (#9068)
* feat(utils,types,framework,medusa): store endpoints should require publishable key * chore: fix specs * chore: fix more specs * chore: update js-sdk * chore: fix specs wrt to default SC * chore: revert custom headers + change error message * chore: fix specs * chore: fix new store specs
This commit is contained in:
@@ -1,17 +1,21 @@
|
||||
import { medusaIntegrationTestRunner } from "medusa-test-utils"
|
||||
import {
|
||||
generatePublishableKey,
|
||||
generateStoreHeaders,
|
||||
} from "../../../../helpers/create-admin-user"
|
||||
|
||||
jest.setTimeout(50000)
|
||||
|
||||
const env = { MEDUSA_FF_MEDUSA_V2: true }
|
||||
const storeHeaders = {
|
||||
headers: {},
|
||||
}
|
||||
|
||||
medusaIntegrationTestRunner({
|
||||
env,
|
||||
testSuite: ({ api }) => {
|
||||
testSuite: ({ api, getContainer }) => {
|
||||
describe("Currency - Store", () => {
|
||||
it("should correctly retrieve and list currencies", async () => {
|
||||
const publishableKey = await generatePublishableKey(getContainer())
|
||||
const storeHeaders = generateStoreHeaders({ publishableKey })
|
||||
|
||||
const listResp = await api.get("/store/currencies", storeHeaders)
|
||||
|
||||
expect(listResp.data.currencies).toEqual(
|
||||
|
||||
Reference in New Issue
Block a user