Merged in chore/add-tests-to-getAdditionalPrice (pull request #3065)
chore: Refactor types and add tests to parts of price calcuations * Add tests to sumPackages * Refactor types and add tests to getAdditionalPrice * Don't always generate coverage * Add tests and refactor types of getRedemptionPrice Approved-by: Joakim Jäderberg
This commit is contained in:
309
packages/booking-flow/lib/stores/enter-details/helpers.test.ts
Normal file
309
packages/booking-flow/lib/stores/enter-details/helpers.test.ts
Normal file
@@ -0,0 +1,309 @@
|
||||
import { describe, expect, it } from "vitest"
|
||||
|
||||
import { CurrencyEnum } from "@scandic-hotels/common/constants/currency"
|
||||
|
||||
import { getAdditionalPrice, getRedemptionPrice } from "./helpers"
|
||||
|
||||
type GetAdditionalPriceParams = Parameters<typeof getAdditionalPrice>
|
||||
describe("getAdditionalPrice", () => {
|
||||
it("should calculate additional price correctly with only additional price", () => {
|
||||
const total: GetAdditionalPriceParams[0] = {
|
||||
local: {
|
||||
additionalPrice: 0,
|
||||
additionalPriceCurrency: CurrencyEnum.CC,
|
||||
},
|
||||
}
|
||||
const adults = 1
|
||||
const nights = 1
|
||||
const breakfast = undefined
|
||||
const packages = undefined
|
||||
const additionalPrice = 100
|
||||
const additionalPriceCurrency = CurrencyEnum.SEK
|
||||
|
||||
getAdditionalPrice(
|
||||
total,
|
||||
adults,
|
||||
breakfast,
|
||||
nights,
|
||||
packages,
|
||||
additionalPrice,
|
||||
additionalPriceCurrency
|
||||
)
|
||||
|
||||
expect(total.local.additionalPrice).toBe(100)
|
||||
})
|
||||
|
||||
it("should set additional price currency correctly when missing in total", () => {
|
||||
const total: GetAdditionalPriceParams[0] = {
|
||||
local: {
|
||||
additionalPrice: 0,
|
||||
},
|
||||
}
|
||||
const adults = 1
|
||||
const nights = 1
|
||||
const breakfast = undefined
|
||||
const packages = undefined
|
||||
const additionalPrice = 100
|
||||
const additionalPriceCurrency = CurrencyEnum.SEK
|
||||
|
||||
getAdditionalPrice(
|
||||
total,
|
||||
adults,
|
||||
breakfast,
|
||||
nights,
|
||||
packages,
|
||||
additionalPrice,
|
||||
additionalPriceCurrency
|
||||
)
|
||||
|
||||
expect(total.local.additionalPriceCurrency).toBe(CurrencyEnum.SEK)
|
||||
})
|
||||
|
||||
it("should calculate price correctly with breakfast", () => {
|
||||
const total: GetAdditionalPriceParams[0] = {
|
||||
local: {
|
||||
additionalPrice: 0,
|
||||
},
|
||||
}
|
||||
const adults = 2
|
||||
const nights = 2
|
||||
const breakfast = { localPrice: { price: 50, currency: CurrencyEnum.SEK } }
|
||||
const packages: never[] = []
|
||||
|
||||
getAdditionalPrice(total, adults, breakfast, nights, packages)
|
||||
|
||||
expect(total.local.additionalPrice).toBe(200)
|
||||
})
|
||||
|
||||
it("should calculate price correctly with packages", () => {
|
||||
const total: GetAdditionalPriceParams[0] = {
|
||||
local: {
|
||||
additionalPrice: 0,
|
||||
},
|
||||
}
|
||||
const adults = 2
|
||||
const nights = 2
|
||||
const breakfast = undefined
|
||||
const packages = [
|
||||
{
|
||||
localPrice: { totalPrice: 50, currency: CurrencyEnum.SEK },
|
||||
},
|
||||
{
|
||||
localPrice: { totalPrice: 25, currency: CurrencyEnum.SEK },
|
||||
},
|
||||
]
|
||||
|
||||
getAdditionalPrice(total, adults, breakfast, nights, packages)
|
||||
|
||||
expect(total.local.additionalPrice).toBe(75)
|
||||
})
|
||||
|
||||
it("should calculate price correctly with breakfast, packages and additionalPrice", () => {
|
||||
const total: GetAdditionalPriceParams[0] = {
|
||||
local: {
|
||||
additionalPrice: 0,
|
||||
},
|
||||
}
|
||||
const adults = 2
|
||||
const nights = 2
|
||||
const breakfast = { localPrice: { price: 50, currency: CurrencyEnum.SEK } }
|
||||
const packages = [
|
||||
{
|
||||
localPrice: { totalPrice: 50, currency: CurrencyEnum.SEK },
|
||||
},
|
||||
{
|
||||
localPrice: { totalPrice: 25, currency: CurrencyEnum.SEK },
|
||||
},
|
||||
]
|
||||
const additionalPrice = 33
|
||||
const additionalPriceCurrency = CurrencyEnum.SEK
|
||||
|
||||
getAdditionalPrice(
|
||||
total,
|
||||
adults,
|
||||
breakfast,
|
||||
nights,
|
||||
packages,
|
||||
additionalPrice,
|
||||
additionalPriceCurrency
|
||||
)
|
||||
|
||||
expect(total.local.additionalPrice).toBe(308)
|
||||
})
|
||||
})
|
||||
|
||||
describe("getRedemptionPrice", () => {
|
||||
it("returns price 0 and default currency when rooms are empty", () => {
|
||||
const result = getRedemptionPrice([], 1)
|
||||
|
||||
expect(result).toEqual({
|
||||
local: { price: 0, currency: CurrencyEnum.POINTS },
|
||||
requested: undefined,
|
||||
})
|
||||
})
|
||||
|
||||
it("returns price 0 and set currency when rooms are empty", () => {
|
||||
const result = getRedemptionPrice([], 1, CurrencyEnum.EUROBONUS)
|
||||
|
||||
expect(result).toEqual({
|
||||
local: { price: 0, currency: CurrencyEnum.EUROBONUS },
|
||||
requested: undefined,
|
||||
})
|
||||
})
|
||||
|
||||
it("returns price for single room with redemption price", () => {
|
||||
const nights = 1
|
||||
const result = getRedemptionPrice(
|
||||
[
|
||||
{
|
||||
adults: 1,
|
||||
breakfast: false,
|
||||
roomFeatures: [],
|
||||
roomRate: {
|
||||
redemption: {
|
||||
localPrice: {
|
||||
pointsPerStay: 100,
|
||||
currency: CurrencyEnum.POINTS,
|
||||
additionalPricePerStay: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
nights
|
||||
)
|
||||
|
||||
expect(result).toEqual({
|
||||
local: {
|
||||
price: 100,
|
||||
currency: CurrencyEnum.POINTS,
|
||||
additionalPrice: 0,
|
||||
additionalPriceCurrency: CurrencyEnum.POINTS,
|
||||
},
|
||||
requested: undefined,
|
||||
})
|
||||
})
|
||||
|
||||
it("returns price for single room with multiple nights", () => {
|
||||
const nights = 3
|
||||
const result = getRedemptionPrice(
|
||||
[
|
||||
{
|
||||
adults: 1,
|
||||
breakfast: false,
|
||||
roomFeatures: [],
|
||||
roomRate: {
|
||||
redemption: {
|
||||
localPrice: {
|
||||
pointsPerStay: 100,
|
||||
currency: CurrencyEnum.POINTS,
|
||||
additionalPricePerStay: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
nights
|
||||
)
|
||||
|
||||
expect(result).toEqual({
|
||||
local: {
|
||||
price: 100,
|
||||
currency: CurrencyEnum.POINTS,
|
||||
additionalPrice: 0,
|
||||
additionalPriceCurrency: CurrencyEnum.POINTS,
|
||||
},
|
||||
requested: undefined,
|
||||
})
|
||||
})
|
||||
|
||||
it("returns price for multiple rooms with multiple nights", () => {
|
||||
const nights = 3
|
||||
const result = getRedemptionPrice(
|
||||
[
|
||||
{
|
||||
adults: 1,
|
||||
breakfast: false,
|
||||
roomFeatures: [],
|
||||
roomRate: {
|
||||
redemption: {
|
||||
localPrice: {
|
||||
pointsPerStay: 100,
|
||||
currency: CurrencyEnum.POINTS,
|
||||
additionalPricePerStay: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
adults: 1,
|
||||
breakfast: false,
|
||||
roomFeatures: [],
|
||||
roomRate: {
|
||||
redemption: {
|
||||
localPrice: {
|
||||
pointsPerStay: 150,
|
||||
currency: CurrencyEnum.POINTS,
|
||||
additionalPricePerStay: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
nights
|
||||
)
|
||||
|
||||
expect(result).toEqual({
|
||||
local: {
|
||||
price: 250,
|
||||
currency: CurrencyEnum.POINTS,
|
||||
additionalPrice: 0,
|
||||
additionalPriceCurrency: CurrencyEnum.POINTS,
|
||||
},
|
||||
requested: undefined,
|
||||
})
|
||||
})
|
||||
|
||||
it("does not return price for room without redemption", () => {
|
||||
const nights = 3
|
||||
const result = getRedemptionPrice(
|
||||
[
|
||||
{
|
||||
adults: 1,
|
||||
breakfast: false,
|
||||
roomFeatures: [],
|
||||
roomRate: {
|
||||
public: {
|
||||
price: 150,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
adults: 1,
|
||||
breakfast: false,
|
||||
roomFeatures: [],
|
||||
roomRate: {
|
||||
redemption: {
|
||||
localPrice: {
|
||||
pointsPerStay: 150,
|
||||
currency: CurrencyEnum.POINTS,
|
||||
additionalPricePerStay: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
nights
|
||||
)
|
||||
|
||||
expect(result).toEqual({
|
||||
local: {
|
||||
price: 150,
|
||||
currency: CurrencyEnum.POINTS,
|
||||
additionalPrice: 0,
|
||||
additionalPriceCurrency: CurrencyEnum.POINTS,
|
||||
},
|
||||
requested: undefined,
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -14,7 +14,6 @@ import type {
|
||||
CorporateChequeProduct,
|
||||
PriceProduct,
|
||||
Product,
|
||||
RedemptionProduct,
|
||||
VoucherProduct,
|
||||
} from "@scandic-hotels/trpc/types/roomAvailability"
|
||||
import type { User } from "@scandic-hotels/trpc/types/user"
|
||||
@@ -276,12 +275,23 @@ export function clearSessionStorage() {
|
||||
sessionStorage.removeItem(detailsStorageName)
|
||||
}
|
||||
|
||||
function getAdditionalPrice(
|
||||
total: Price,
|
||||
export function getAdditionalPrice(
|
||||
total: {
|
||||
local: {
|
||||
additionalPrice?: number
|
||||
additionalPriceCurrency?: CurrencyEnum
|
||||
}
|
||||
},
|
||||
adults: number,
|
||||
breakfast: BreakfastPackage | false | undefined,
|
||||
breakfast:
|
||||
| { localPrice: { price: number; currency?: CurrencyEnum } }
|
||||
| false
|
||||
| undefined,
|
||||
nights: number,
|
||||
packages: Packages | null,
|
||||
packages:
|
||||
| { localPrice: { totalPrice: number; currency?: CurrencyEnum } }[]
|
||||
| null
|
||||
| undefined,
|
||||
additionalPrice = 0,
|
||||
additionalPriceCurrency?: CurrencyEnum | null | undefined
|
||||
) {
|
||||
@@ -440,17 +450,40 @@ function getVoucherPrice(rooms: TRoom[], nights: number) {
|
||||
)
|
||||
}
|
||||
|
||||
interface TRoomRedemption extends TRoom {
|
||||
roomRate: RedemptionProduct
|
||||
type GetRedemptionPriceRoom = {
|
||||
adults: number
|
||||
breakfast:
|
||||
| { localPrice: { price: number; currency?: CurrencyEnum } }
|
||||
| false
|
||||
| undefined
|
||||
roomFeatures:
|
||||
| {
|
||||
localPrice: { totalPrice: number; currency?: CurrencyEnum }
|
||||
}[]
|
||||
| null
|
||||
| undefined
|
||||
// We don't care about roomRate unless it's RedemptionProduct
|
||||
roomRate: object
|
||||
}
|
||||
type RedemptionRoom = GetRedemptionPriceRoom & {
|
||||
roomRate: {
|
||||
redemption: {
|
||||
localPrice: {
|
||||
pointsPerStay: number
|
||||
additionalPricePerStay: number
|
||||
currency?: CurrencyEnum
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getRedemptionPrice(
|
||||
rooms: TRoom[],
|
||||
export function getRedemptionPrice(
|
||||
rooms: GetRedemptionPriceRoom[],
|
||||
nights: number,
|
||||
pointsCurrency?: CurrencyEnum
|
||||
) {
|
||||
return rooms
|
||||
.filter((room): room is TRoomRedemption => "redemption" in room.roomRate)
|
||||
.filter((room): room is RedemptionRoom => "redemption" in room.roomRate)
|
||||
.reduce<Price>(
|
||||
(total, room) => {
|
||||
const redemption = room.roomRate.redemption
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { describe, expect, it } from "vitest"
|
||||
|
||||
import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert"
|
||||
import { CurrencyEnum } from "@scandic-hotels/common/constants/currency"
|
||||
import { dt } from "@scandic-hotels/common/dt"
|
||||
|
||||
import { filterOverlappingDates } from "./index"
|
||||
import { filterOverlappingDates, sumPackages } from "./index"
|
||||
|
||||
import type { specialAlertsSchema } from "@scandic-hotels/trpc/routers/hotels/schemas/hotel/specialAlerts"
|
||||
import type { z } from "zod"
|
||||
@@ -71,3 +72,29 @@ describe("filterOverlappingDates", () => {
|
||||
expect(result).toHaveLength(0)
|
||||
})
|
||||
})
|
||||
|
||||
describe("sumPackages", () => {
|
||||
it("returns 0 price for null packages", () => {
|
||||
const result = sumPackages(null)
|
||||
expect(result).toEqual({ currency: undefined, price: 0 })
|
||||
})
|
||||
|
||||
it("returns 0 price for undefined packages", () => {
|
||||
const result = sumPackages(undefined)
|
||||
expect(result).toEqual({ currency: undefined, price: 0 })
|
||||
})
|
||||
|
||||
it("returns 0 price for empty packages", () => {
|
||||
const result = sumPackages([])
|
||||
expect(result).toEqual({ currency: undefined, price: 0 })
|
||||
})
|
||||
|
||||
it("sums prices of packages", () => {
|
||||
const result = sumPackages([
|
||||
{ localPrice: { totalPrice: 100, currency: CurrencyEnum.SEK } },
|
||||
{ localPrice: { totalPrice: 200, currency: CurrencyEnum.SEK } },
|
||||
{ localPrice: { totalPrice: 50, currency: CurrencyEnum.SEK } },
|
||||
])
|
||||
expect(result).toEqual({ currency: CurrencyEnum.SEK, price: 350 })
|
||||
})
|
||||
})
|
||||
|
||||
@@ -8,7 +8,8 @@ import { ChildBedMapEnum } from "@scandic-hotels/trpc/enums/childBedMapEnum"
|
||||
import { ChildBedTypeEnum } from "@scandic-hotels/trpc/enums/childBedTypeEnum"
|
||||
import { RoomPackageCodeEnum } from "@scandic-hotels/trpc/enums/roomFilter"
|
||||
|
||||
import type { Package, Packages } from "@scandic-hotels/trpc/types/packages"
|
||||
import type { CurrencyEnum } from "@scandic-hotels/common/constants/currency"
|
||||
import type { Packages } from "@scandic-hotels/trpc/types/packages"
|
||||
import type { JSX } from "react"
|
||||
|
||||
import type { RoomPackageCodes } from "../../types/components/selectRate/roomFilter"
|
||||
@@ -39,7 +40,10 @@ export const invertedBedTypeMap: Record<ChildBedTypeEnum, string> = {
|
||||
}
|
||||
|
||||
export function sumPackages(
|
||||
packages: Pick<Package, "localPrice">[] | undefined | null
|
||||
packages:
|
||||
| { localPrice: { totalPrice: number; currency?: CurrencyEnum } }[]
|
||||
| null
|
||||
| undefined
|
||||
) {
|
||||
if (!packages || !packages.length) {
|
||||
return {
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
"@types/react": "19.1.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.32.0",
|
||||
"@typescript-eslint/parser": "^8.32.0",
|
||||
"@vitest/coverage-v8": "^3.2.4",
|
||||
"dotenv": "^16.5.0",
|
||||
"eslint": "^9",
|
||||
"eslint-plugin-formatjs": "^5.3.1",
|
||||
|
||||
181
yarn.lock
181
yarn.lock
@@ -12,7 +12,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@ampproject/remapping@npm:^2.2.0":
|
||||
"@ampproject/remapping@npm:^2.2.0, @ampproject/remapping@npm:^2.3.0":
|
||||
version: 2.3.0
|
||||
resolution: "@ampproject/remapping@npm:2.3.0"
|
||||
dependencies:
|
||||
@@ -385,6 +385,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@babel/helper-validator-identifier@npm:^7.28.5":
|
||||
version: 7.28.5
|
||||
resolution: "@babel/helper-validator-identifier@npm:7.28.5"
|
||||
checksum: 10c0/42aaebed91f739a41f3d80b72752d1f95fd7c72394e8e4bd7cdd88817e0774d80a432451bcba17c2c642c257c483bf1d409dd4548883429ea9493a3bc4ab0847
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@babel/helper-validator-option@npm:^7.25.9, @babel/helper-validator-option@npm:^7.27.1":
|
||||
version: 7.27.1
|
||||
resolution: "@babel/helper-validator-option@npm:7.27.1"
|
||||
@@ -424,6 +431,17 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@babel/parser@npm:^7.25.4":
|
||||
version: 7.28.5
|
||||
resolution: "@babel/parser@npm:7.28.5"
|
||||
dependencies:
|
||||
"@babel/types": "npm:^7.28.5"
|
||||
bin:
|
||||
parser: ./bin/babel-parser.js
|
||||
checksum: 10c0/5bbe48bf2c79594ac02b490a41ffde7ef5aa22a9a88ad6bcc78432a6ba8a9d638d531d868bd1f104633f1f6bba9905746e15185b8276a3756c42b765d131b1ef
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.25.9":
|
||||
version: 7.25.9
|
||||
resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:7.25.9"
|
||||
@@ -1400,6 +1418,23 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@babel/types@npm:^7.25.4, @babel/types@npm:^7.28.5":
|
||||
version: 7.28.5
|
||||
resolution: "@babel/types@npm:7.28.5"
|
||||
dependencies:
|
||||
"@babel/helper-string-parser": "npm:^7.27.1"
|
||||
"@babel/helper-validator-identifier": "npm:^7.28.5"
|
||||
checksum: 10c0/a5a483d2100befbf125793640dec26b90b95fd233a94c19573325898a5ce1e52cdfa96e495c7dcc31b5eca5b66ce3e6d4a0f5a4a62daec271455959f208ab08a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@bcoe/v8-coverage@npm:^1.0.2":
|
||||
version: 1.0.2
|
||||
resolution: "@bcoe/v8-coverage@npm:1.0.2"
|
||||
checksum: 10c0/1eb1dc93cc17fb7abdcef21a6e7b867d6aa99a7ec88ec8207402b23d9083ab22a8011213f04b2cf26d535f1d22dc26139b7929e6c2134c254bd1e14ba5e678c3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@contentstack/live-preview-utils@npm:^3.2.1":
|
||||
version: 3.2.1
|
||||
resolution: "@contentstack/live-preview-utils@npm:3.2.1"
|
||||
@@ -2263,6 +2298,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@istanbuljs/schema@npm:^0.1.2":
|
||||
version: 0.1.3
|
||||
resolution: "@istanbuljs/schema@npm:0.1.3"
|
||||
checksum: 10c0/61c5286771676c9ca3eb2bd8a7310a9c063fb6e0e9712225c8471c582d157392c88f5353581c8c9adbe0dff98892317d2fdfc56c3499aa42e0194405206a963a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@joshwooding/vite-plugin-react-docgen-typescript@npm:0.6.1":
|
||||
version: 0.6.1
|
||||
resolution: "@joshwooding/vite-plugin-react-docgen-typescript@npm:0.6.1"
|
||||
@@ -2304,6 +2346,16 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@jridgewell/trace-mapping@npm:^0.3.23, @jridgewell/trace-mapping@npm:^0.3.31":
|
||||
version: 0.3.31
|
||||
resolution: "@jridgewell/trace-mapping@npm:0.3.31"
|
||||
dependencies:
|
||||
"@jridgewell/resolve-uri": "npm:^3.1.0"
|
||||
"@jridgewell/sourcemap-codec": "npm:^1.4.14"
|
||||
checksum: 10c0/4b30ec8cd56c5fd9a661f088230af01e0c1a3888d11ffb6b47639700f71225be21d1f7e168048d6d4f9449207b978a235c07c8f15c07705685d16dc06280e9d9
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.28":
|
||||
version: 0.3.30
|
||||
resolution: "@jridgewell/trace-mapping@npm:0.3.30"
|
||||
@@ -5768,6 +5820,7 @@ __metadata:
|
||||
"@typescript-eslint/eslint-plugin": "npm:^8.32.0"
|
||||
"@typescript-eslint/parser": "npm:^8.32.0"
|
||||
"@vis.gl/react-google-maps": "npm:^1.5.2"
|
||||
"@vitest/coverage-v8": "npm:^3.2.4"
|
||||
class-variance-authority: "npm:^0.7.1"
|
||||
client-only: "npm:^0.0.1"
|
||||
date-fns: "npm:^4.1.0"
|
||||
@@ -8013,6 +8066,33 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@vitest/coverage-v8@npm:^3.2.4":
|
||||
version: 3.2.4
|
||||
resolution: "@vitest/coverage-v8@npm:3.2.4"
|
||||
dependencies:
|
||||
"@ampproject/remapping": "npm:^2.3.0"
|
||||
"@bcoe/v8-coverage": "npm:^1.0.2"
|
||||
ast-v8-to-istanbul: "npm:^0.3.3"
|
||||
debug: "npm:^4.4.1"
|
||||
istanbul-lib-coverage: "npm:^3.2.2"
|
||||
istanbul-lib-report: "npm:^3.0.1"
|
||||
istanbul-lib-source-maps: "npm:^5.0.6"
|
||||
istanbul-reports: "npm:^3.1.7"
|
||||
magic-string: "npm:^0.30.17"
|
||||
magicast: "npm:^0.3.5"
|
||||
std-env: "npm:^3.9.0"
|
||||
test-exclude: "npm:^7.0.1"
|
||||
tinyrainbow: "npm:^2.0.0"
|
||||
peerDependencies:
|
||||
"@vitest/browser": 3.2.4
|
||||
vitest: 3.2.4
|
||||
peerDependenciesMeta:
|
||||
"@vitest/browser":
|
||||
optional: true
|
||||
checksum: 10c0/cae3e58d81d56e7e1cdecd7b5baab7edd0ad9dee8dec9353c52796e390e452377d3f04174d40b6986b17c73241a5e773e422931eaa8102dcba0605ff24b25193
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@vitest/expect@npm:3.2.4":
|
||||
version: 3.2.4
|
||||
resolution: "@vitest/expect@npm:3.2.4"
|
||||
@@ -8556,6 +8636,17 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ast-v8-to-istanbul@npm:^0.3.3":
|
||||
version: 0.3.8
|
||||
resolution: "ast-v8-to-istanbul@npm:0.3.8"
|
||||
dependencies:
|
||||
"@jridgewell/trace-mapping": "npm:^0.3.31"
|
||||
estree-walker: "npm:^3.0.3"
|
||||
js-tokens: "npm:^9.0.1"
|
||||
checksum: 10c0/6f7d74fc36011699af6d4ad88ecd8efc7d74bd90b8e8dbb1c69d43c8f4bec0ed361fb62a5b5bd98bbee02ee87c62cd8bcc25a39634964e45476bf5489dfa327f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"async-function@npm:^1.0.0":
|
||||
version: 1.0.0
|
||||
resolution: "async-function@npm:1.0.0"
|
||||
@@ -11105,7 +11196,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"glob@npm:^10.0.0, glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7":
|
||||
"glob@npm:^10.0.0, glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7, glob@npm:^10.4.1":
|
||||
version: 10.4.5
|
||||
resolution: "glob@npm:10.4.5"
|
||||
dependencies:
|
||||
@@ -11354,6 +11445,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"html-escaper@npm:^2.0.0":
|
||||
version: 2.0.2
|
||||
resolution: "html-escaper@npm:2.0.2"
|
||||
checksum: 10c0/208e8a12de1a6569edbb14544f4567e6ce8ecc30b9394fcaa4e7bb1e60c12a7c9a1ed27e31290817157e8626f3a4f29e76c8747030822eb84a6abb15c255f0a0
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"html-react-parser@npm:^5.2.3":
|
||||
version: 5.2.3
|
||||
resolution: "html-react-parser@npm:5.2.3"
|
||||
@@ -12017,6 +12115,45 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.2":
|
||||
version: 3.2.2
|
||||
resolution: "istanbul-lib-coverage@npm:3.2.2"
|
||||
checksum: 10c0/6c7ff2106769e5f592ded1fb418f9f73b4411fd5a084387a5410538332b6567cd1763ff6b6cadca9b9eb2c443cce2f7ea7d7f1b8d315f9ce58539793b1e0922b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"istanbul-lib-report@npm:^3.0.0, istanbul-lib-report@npm:^3.0.1":
|
||||
version: 3.0.1
|
||||
resolution: "istanbul-lib-report@npm:3.0.1"
|
||||
dependencies:
|
||||
istanbul-lib-coverage: "npm:^3.0.0"
|
||||
make-dir: "npm:^4.0.0"
|
||||
supports-color: "npm:^7.1.0"
|
||||
checksum: 10c0/84323afb14392de8b6a5714bd7e9af845cfbd56cfe71ed276cda2f5f1201aea673c7111901227ee33e68e4364e288d73861eb2ed48f6679d1e69a43b6d9b3ba7
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"istanbul-lib-source-maps@npm:^5.0.6":
|
||||
version: 5.0.6
|
||||
resolution: "istanbul-lib-source-maps@npm:5.0.6"
|
||||
dependencies:
|
||||
"@jridgewell/trace-mapping": "npm:^0.3.23"
|
||||
debug: "npm:^4.1.1"
|
||||
istanbul-lib-coverage: "npm:^3.0.0"
|
||||
checksum: 10c0/ffe75d70b303a3621ee4671554f306e0831b16f39ab7f4ab52e54d356a5d33e534d97563e318f1333a6aae1d42f91ec49c76b6cd3f3fb378addcb5c81da0255f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"istanbul-reports@npm:^3.1.7":
|
||||
version: 3.2.0
|
||||
resolution: "istanbul-reports@npm:3.2.0"
|
||||
dependencies:
|
||||
html-escaper: "npm:^2.0.0"
|
||||
istanbul-lib-report: "npm:^3.0.0"
|
||||
checksum: 10c0/d596317cfd9c22e1394f22a8d8ba0303d2074fe2e971887b32d870e4b33f8464b10f8ccbe6847808f7db485f084eba09e6c2ed706b3a978e4b52f07085b8f9bc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"iterator.prototype@npm:^1.1.4":
|
||||
version: 1.1.5
|
||||
resolution: "iterator.prototype@npm:1.1.5"
|
||||
@@ -12665,6 +12802,26 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"magicast@npm:^0.3.5":
|
||||
version: 0.3.5
|
||||
resolution: "magicast@npm:0.3.5"
|
||||
dependencies:
|
||||
"@babel/parser": "npm:^7.25.4"
|
||||
"@babel/types": "npm:^7.25.4"
|
||||
source-map-js: "npm:^1.2.0"
|
||||
checksum: 10c0/a6cacc0a848af84f03e3f5bda7b0de75e4d0aa9ddce5517fd23ed0f31b5ddd51b2d0ff0b7e09b51f7de0f4053c7a1107117edda6b0732dca3e9e39e6c5a68c64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"make-dir@npm:^4.0.0":
|
||||
version: 4.0.0
|
||||
resolution: "make-dir@npm:4.0.0"
|
||||
dependencies:
|
||||
semver: "npm:^7.5.3"
|
||||
checksum: 10c0/69b98a6c0b8e5c4fe9acb61608a9fbcfca1756d910f51e5dbe7a9e5cfb74fca9b8a0c8a0ffdf1294a740826c1ab4871d5bf3f62f72a3049e5eac6541ddffed68
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"make-fetch-happen@npm:^14.0.3":
|
||||
version: 14.0.3
|
||||
resolution: "make-fetch-happen@npm:14.0.3"
|
||||
@@ -15132,6 +15289,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"semver@npm:^7.5.3":
|
||||
version: 7.7.3
|
||||
resolution: "semver@npm:7.7.3"
|
||||
bin:
|
||||
semver: bin/semver.js
|
||||
checksum: 10c0/4afe5c986567db82f44c8c6faef8fe9df2a9b1d98098fc1721f57c696c4c21cebd572f297fc21002f81889492345b8470473bc6f4aff5fb032a6ea59ea2bc45e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"semver@npm:~7.5.4":
|
||||
version: 7.5.4
|
||||
resolution: "semver@npm:7.5.4"
|
||||
@@ -15954,6 +16120,17 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"test-exclude@npm:^7.0.1":
|
||||
version: 7.0.1
|
||||
resolution: "test-exclude@npm:7.0.1"
|
||||
dependencies:
|
||||
"@istanbuljs/schema": "npm:^0.1.2"
|
||||
glob: "npm:^10.4.1"
|
||||
minimatch: "npm:^9.0.4"
|
||||
checksum: 10c0/6d67b9af4336a2e12b26a68c83308c7863534c65f27ed4ff7068a56f5a58f7ac703e8fc80f698a19bb154fd8f705cdf7ec347d9512b2c522c737269507e7b263
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"thread-stream@npm:^3.0.0":
|
||||
version: 3.1.0
|
||||
resolution: "thread-stream@npm:3.1.0"
|
||||
|
||||
Reference in New Issue
Block a user