fix(tax): Make system provider registration backward compatible (#12441)
* fix(tax): Make provider registration backward compatible * add tests
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { ITaxModuleService } from "@medusajs/framework/types"
|
||||
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { moduleIntegrationTestRunner } from "@medusajs/test-utils"
|
||||
|
||||
jest.setTimeout(30000)
|
||||
|
||||
moduleIntegrationTestRunner<ITaxModuleService>({
|
||||
moduleName: Modules.TAX,
|
||||
testSuite: ({ service }) => {
|
||||
describe("Tax Module Service", () => {
|
||||
describe("providers", () => {
|
||||
it("should have loaded local tax provider successfully", async () => {
|
||||
const providers = await service.listTaxProviders()
|
||||
|
||||
expect(providers).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
id: "tp_system",
|
||||
is_enabled: true,
|
||||
}),
|
||||
])
|
||||
)
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user