Merged in fix/SW-3021-vouchers (pull request #2719)
fix(SW-3021): add pluralization support for vouchers * fix(SW-3021): add pluralization support for vouchers Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -2,20 +2,11 @@ import { describe, expect, it } from "vitest"
|
||||
|
||||
import { getTotalPrice } from "./getTotalPrice"
|
||||
|
||||
import type { IntlShape } from "react-intl"
|
||||
|
||||
const mockIntl = {
|
||||
formatMessage: ({ defaultMessage }: { defaultMessage: string }) => {
|
||||
return defaultMessage
|
||||
},
|
||||
} as IntlShape
|
||||
|
||||
describe("getTotalPrice", () => {
|
||||
it("should return null when no rates are selected", () => {
|
||||
const result = getTotalPrice({
|
||||
selectedRates: [],
|
||||
useMemberPrices: false,
|
||||
intl: mockIntl,
|
||||
})
|
||||
|
||||
expect(result).toEqual({
|
||||
|
||||
Reference in New Issue
Block a user