|
1
|
import { ITaxModuleService } from "@medusajs/framework/types" |
|
2
|
|
|
3
|
import { Modules } from "@medusajs/framework/utils" |
|
4
|
import { moduleIntegrationTestRunner } from "@medusajs/test-utils" |
|
5
|
|
|
6
|
jest.setTimeout(30000) |
|
7
|
|
|
8
|
moduleIntegrationTestRunner<ITaxModuleService>({ |
|
9
|
moduleName: Modules.TAX, |
|
10
|
testSuite: ({ service }) => { |
|
11
|
describe("Tax Module Service", () => { |
|
12
|
describe("providers", () => { |
|
13
|
it("should have loaded local tax provider successfully", async () => { |
|
14
|
const providers = await service.listTaxProviders() |
|
15
|
|
|
16
|
expect(providers).toEqual( |
|
17
|
expect.arrayContaining([ |
|
18
|
expect.objectContaining({ |
|
19
|
id: "tp_system", |
|
20
|
is_enabled: true, |
|
21
|
}), |
|
22
|
]) |
|
23
|
) |
|
24
|
}) |
|
25
|
}) |
|
26
|
}) |
|
27
|
}, |
|
28
|
}) |