feat: Added Malawi kwacha to currency list (#12440)
* Add Malawi kwacha currency * fix failing currency tests --------- Co-authored-by: Stevche Radevski <sradevski@live.com>
This commit is contained in:
1 parent
2c2528a087
commit
1797f0298b
3 files changed
+13
-4
No files matched your search
@@ -22,7 +22,7 @@ medusaIntegrationTestRunner({
|
|||||||
)
|
)
|
||||||
|
|
||||||
expect(response.status).toEqual(200)
|
expect(response.status).toEqual(200)
|
||||||
expect(response.data.currencies).toHaveLength(120)
|
expect(response.data.currencies).toHaveLength(121)
|
||||||
expect(response.data.currencies).toEqual(
|
expect(response.data.currencies).toEqual(
|
||||||
expect.arrayContaining([
|
expect.arrayContaining([
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
|
|||||||
@@ -675,6 +675,15 @@ export const defaultCurrencies: Record<string, Currency> = {
|
|||||||
code: "MUR",
|
code: "MUR",
|
||||||
name_plural: "Mauritian rupees",
|
name_plural: "Mauritian rupees",
|
||||||
},
|
},
|
||||||
|
MWK: {
|
||||||
|
symbol: "K",
|
||||||
|
name: "Malawian Kwacha",
|
||||||
|
symbol_native: "K",
|
||||||
|
decimal_digits: 2,
|
||||||
|
rounding: 0,
|
||||||
|
code: "MWK",
|
||||||
|
name_plural: "Malawian Kwachas",
|
||||||
|
},
|
||||||
MXN: {
|
MXN: {
|
||||||
symbol: "MX$",
|
symbol: "MX$",
|
||||||
name: "Mexican Peso",
|
name: "Mexican Peso",
|
||||||
|
|||||||
+3
-3
@@ -86,7 +86,7 @@ moduleIntegrationTestRunner<ICurrencyModuleService>({
|
|||||||
const [currenciesResult, count] =
|
const [currenciesResult, count] =
|
||||||
await service.listAndCountCurrencies({}, {})
|
await service.listAndCountCurrencies({}, {})
|
||||||
|
|
||||||
expect(count).toEqual(120)
|
expect(count).toEqual(121)
|
||||||
expect(currenciesResult).toEqual(
|
expect(currenciesResult).toEqual(
|
||||||
expect.arrayContaining([
|
expect.arrayContaining([
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
@@ -123,7 +123,7 @@ moduleIntegrationTestRunner<ICurrencyModuleService>({
|
|||||||
const [currenciesResult, count] =
|
const [currenciesResult, count] =
|
||||||
await service.listAndCountCurrencies({}, { skip: 5, take: 1 })
|
await service.listAndCountCurrencies({}, { skip: 5, take: 1 })
|
||||||
|
|
||||||
expect(count).toEqual(120)
|
expect(count).toEqual(121)
|
||||||
expect(currenciesResult).toEqual([
|
expect(currenciesResult).toEqual([
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
code: "aud",
|
code: "aud",
|
||||||
@@ -144,7 +144,7 @@ moduleIntegrationTestRunner<ICurrencyModuleService>({
|
|||||||
|
|
||||||
const serialized = JSON.parse(JSON.stringify(currenciesResult))
|
const serialized = JSON.parse(JSON.stringify(currenciesResult))
|
||||||
|
|
||||||
expect(count).toEqual(120)
|
expect(count).toEqual(121)
|
||||||
expect(serialized).toEqual([
|
expect(serialized).toEqual([
|
||||||
{
|
{
|
||||||
code: "aed",
|
code: "aed",
|
||||||
|
|||||||
Reference in new issue
Block a user