fix(SW-3198): fix striketrhough/regular prices, the same in enter details as select rate * fix(SW-3198): fix striketrhough/regular prices, the same in enter details as select rate * fix(SW-3198): remove additonalcost if calculating cost per room * fix(SW-3198): include bookingcode in specialrate * fix(SW-3198): remove console log * fix(SW-3198): add or operator * fix(SW-3198): capture total return value * fix(SW-3198): rename and move function Approved-by: Joakim Jäderberg Approved-by: Hrishikesh Vaipurkar
22 lines
459 B
TypeScript
22 lines
459 B
TypeScript
import { describe, expect, it } from "vitest"
|
|
|
|
import { getTotalPrice } from "./getTotalPrice"
|
|
|
|
describe("getTotalPrice", () => {
|
|
it("should return null when no rates are selected", () => {
|
|
const result = getTotalPrice({
|
|
selectedRates: [],
|
|
isMember: false,
|
|
})
|
|
|
|
expect(result).toEqual({
|
|
local: {
|
|
currency: "Unknown",
|
|
price: 0,
|
|
regularPrice: undefined,
|
|
},
|
|
requested: undefined,
|
|
})
|
|
})
|
|
})
|