chore: move to swc/jest (#7739)

* chore: move to swc

* chore: fix tax rate tests

* chore: undo failed test

* chore: fix unit tests script

* chore: use node 20

* Update scripts/run-workspace-unit-tests-in-chunks.sh
This commit is contained in:
Riqwan Thamir
2024-06-20 12:59:33 +02:00
committed by GitHub
parent f61557712c
commit 03924a4ff6
137 changed files with 386 additions and 419 deletions
@@ -19,6 +19,7 @@ import {
OptionalProps,
PrimaryKey,
Property,
Rel,
} from "@mikro-orm/core"
import Cart from "./cart"
import ShippingMethodAdjustment from "./shipping-method-adjustment"
@@ -68,7 +69,7 @@ export default class ShippingMethod {
cart_id: string
@ManyToOne({ entity: () => Cart, persist: false })
cart: Cart
cart: Rel<Cart>
@Property({ columnType: "text" })
name: string
@@ -83,7 +84,7 @@ export default class ShippingMethod {
raw_amount: BigNumberRawValue
@Property({ columnType: "boolean" })
is_tax_inclusive = false
is_tax_inclusive: boolean = false
@ShippingOptionIdIndex()
@Property({ columnType: "text", nullable: true })
@@ -102,7 +103,7 @@ export default class ShippingMethod {
cascade: [Cascade.PERSIST, "soft-remove"] as any,
}
)
tax_lines = new Collection<ShippingMethodTaxLine>(this)
tax_lines = new Collection<Rel<ShippingMethodTaxLine>>(this)
@OneToMany(
() => ShippingMethodAdjustment,
@@ -111,7 +112,7 @@ export default class ShippingMethod {
cascade: [Cascade.PERSIST, "soft-remove"] as any,
}
)
adjustments = new Collection<ShippingMethodAdjustment>(this)
adjustments = new Collection<Rel<ShippingMethodAdjustment>>(this)
@Property({
onCreate: () => new Date(),