chore: upgrade moduleResolution to Node16 (#9269)
This commit is contained in:
@@ -4,14 +4,18 @@ import { calculateOrderChange } from "../../../../utils"
|
||||
|
||||
describe("Order Exchange - Actions", function () {
|
||||
const originalOrder = {
|
||||
id: "1",
|
||||
items: [
|
||||
{
|
||||
id: "1",
|
||||
quantity: 1,
|
||||
unit_price: 10,
|
||||
order_id: "1",
|
||||
|
||||
detail: {
|
||||
quantity: 1,
|
||||
order_id: "1",
|
||||
delivered_quantity: 1,
|
||||
shipped_quantity: 1,
|
||||
fulfilled_quantity: 1,
|
||||
return_requested_quantity: 0,
|
||||
@@ -24,9 +28,12 @@ describe("Order Exchange - Actions", function () {
|
||||
id: "2",
|
||||
quantity: 2,
|
||||
unit_price: 100,
|
||||
order_id: "1",
|
||||
|
||||
detail: {
|
||||
quantity: 2,
|
||||
order_id: "1",
|
||||
delivered_quantity: 1,
|
||||
shipped_quantity: 1,
|
||||
fulfilled_quantity: 1,
|
||||
return_requested_quantity: 0,
|
||||
@@ -39,9 +46,12 @@ describe("Order Exchange - Actions", function () {
|
||||
id: "3",
|
||||
quantity: 3,
|
||||
unit_price: 20,
|
||||
order_id: "1",
|
||||
|
||||
detail: {
|
||||
quantity: 3,
|
||||
order_id: "1",
|
||||
delivered_quantity: 1,
|
||||
shipped_quantity: 3,
|
||||
fulfilled_quantity: 3,
|
||||
return_requested_quantity: 0,
|
||||
@@ -55,6 +65,7 @@ describe("Order Exchange - Actions", function () {
|
||||
{
|
||||
id: "ship_123",
|
||||
amount: 0,
|
||||
order_id: "1",
|
||||
},
|
||||
],
|
||||
total: 270,
|
||||
@@ -113,10 +124,13 @@ describe("Order Exchange - Actions", function () {
|
||||
expect(toJson).toEqual([
|
||||
{
|
||||
id: "1",
|
||||
order_id: "1",
|
||||
quantity: 1,
|
||||
unit_price: 10,
|
||||
detail: {
|
||||
quantity: 1,
|
||||
order_id: "1",
|
||||
delivered_quantity: 1,
|
||||
shipped_quantity: 1,
|
||||
fulfilled_quantity: 1,
|
||||
return_requested_quantity: 0,
|
||||
@@ -127,10 +141,13 @@ describe("Order Exchange - Actions", function () {
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
order_id: "1",
|
||||
quantity: 2,
|
||||
unit_price: 100,
|
||||
detail: {
|
||||
quantity: 2,
|
||||
order_id: "1",
|
||||
delivered_quantity: 1,
|
||||
shipped_quantity: 1,
|
||||
fulfilled_quantity: 1,
|
||||
return_requested_quantity: 0,
|
||||
@@ -141,10 +158,13 @@ describe("Order Exchange - Actions", function () {
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
order_id: "1",
|
||||
quantity: 3,
|
||||
unit_price: 20,
|
||||
detail: {
|
||||
quantity: 3,
|
||||
order_id: "1",
|
||||
delivered_quantity: 1,
|
||||
shipped_quantity: 3,
|
||||
fulfilled_quantity: 3,
|
||||
return_requested_quantity: "1",
|
||||
@@ -166,6 +186,7 @@ describe("Order Exchange - Actions", function () {
|
||||
},
|
||||
{
|
||||
id: "item_555",
|
||||
order_id: "1",
|
||||
unit_price: 50,
|
||||
quantity: 1,
|
||||
actions: [
|
||||
@@ -185,10 +206,12 @@ describe("Order Exchange - Actions", function () {
|
||||
expect(changes.order.shipping_methods).toEqual([
|
||||
{
|
||||
id: "ship_123",
|
||||
order_id: "1",
|
||||
amount: 0,
|
||||
},
|
||||
{
|
||||
id: "shipping_345",
|
||||
order_id: "1",
|
||||
amount: 5,
|
||||
actions: [
|
||||
{
|
||||
@@ -200,6 +223,7 @@ describe("Order Exchange - Actions", function () {
|
||||
},
|
||||
{
|
||||
id: "return_shipping_345",
|
||||
order_id: "1",
|
||||
amount: 7.5,
|
||||
actions: [
|
||||
{
|
||||
|
||||
@@ -4,14 +4,18 @@ import { calculateOrderChange } from "../../../../utils"
|
||||
|
||||
describe("Order Return - Actions", function () {
|
||||
const originalOrder = {
|
||||
id: "1",
|
||||
items: [
|
||||
{
|
||||
id: "1",
|
||||
quantity: 1,
|
||||
unit_price: 10,
|
||||
order_id: "1",
|
||||
|
||||
detail: {
|
||||
order_id: "1",
|
||||
quantity: 1,
|
||||
delivered_quantity: 1,
|
||||
shipped_quantity: 1,
|
||||
fulfilled_quantity: 1,
|
||||
return_requested_quantity: 0,
|
||||
@@ -24,9 +28,12 @@ describe("Order Return - Actions", function () {
|
||||
id: "2",
|
||||
quantity: 2,
|
||||
unit_price: 100,
|
||||
order_id: "1",
|
||||
|
||||
detail: {
|
||||
order_id: "1",
|
||||
quantity: 2,
|
||||
delivered_quantity: 1,
|
||||
shipped_quantity: 1,
|
||||
fulfilled_quantity: 1,
|
||||
return_requested_quantity: 0,
|
||||
@@ -39,9 +46,12 @@ describe("Order Return - Actions", function () {
|
||||
id: "3",
|
||||
quantity: 3,
|
||||
unit_price: 20,
|
||||
order_id: "1",
|
||||
|
||||
detail: {
|
||||
order_id: "1",
|
||||
quantity: 3,
|
||||
delivered_quantity: 1,
|
||||
shipped_quantity: 3,
|
||||
fulfilled_quantity: 3,
|
||||
return_requested_quantity: 0,
|
||||
@@ -54,7 +64,8 @@ describe("Order Return - Actions", function () {
|
||||
shipping_methods: [
|
||||
{
|
||||
id: "ship_123",
|
||||
price: 0,
|
||||
amount: 0,
|
||||
order_id: "1",
|
||||
},
|
||||
],
|
||||
total: 270,
|
||||
@@ -130,10 +141,13 @@ describe("Order Return - Actions", function () {
|
||||
expect(toJson).toEqual([
|
||||
{
|
||||
id: "1",
|
||||
order_id: "1",
|
||||
quantity: 1,
|
||||
unit_price: 10,
|
||||
detail: {
|
||||
order_id: "1",
|
||||
quantity: 1,
|
||||
delivered_quantity: 1,
|
||||
shipped_quantity: 1,
|
||||
fulfilled_quantity: 1,
|
||||
return_requested_quantity: 0,
|
||||
@@ -144,11 +158,14 @@ describe("Order Return - Actions", function () {
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
order_id: "1",
|
||||
quantity: 2,
|
||||
unit_price: 100,
|
||||
detail: {
|
||||
order_id: "1",
|
||||
quantity: 2,
|
||||
shipped_quantity: 1,
|
||||
delivered_quantity: 1,
|
||||
fulfilled_quantity: 1,
|
||||
return_requested_quantity: "1",
|
||||
return_received_quantity: 0,
|
||||
@@ -158,11 +175,14 @@ describe("Order Return - Actions", function () {
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
order_id: "1",
|
||||
quantity: 3,
|
||||
unit_price: 20,
|
||||
detail: {
|
||||
quantity: 3,
|
||||
order_id: "1",
|
||||
shipped_quantity: 3,
|
||||
delivered_quantity: 1,
|
||||
fulfilled_quantity: 3,
|
||||
return_requested_quantity: "2",
|
||||
return_received_quantity: 0,
|
||||
@@ -261,10 +281,13 @@ describe("Order Return - Actions", function () {
|
||||
expect(toJsonReceived).toEqual([
|
||||
{
|
||||
id: "1",
|
||||
order_id: "1",
|
||||
quantity: 1,
|
||||
unit_price: 10,
|
||||
detail: {
|
||||
quantity: 1,
|
||||
order_id: "1",
|
||||
delivered_quantity: 1,
|
||||
shipped_quantity: 1,
|
||||
fulfilled_quantity: 1,
|
||||
return_requested_quantity: 0,
|
||||
@@ -275,10 +298,13 @@ describe("Order Return - Actions", function () {
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
order_id: "1",
|
||||
quantity: 2,
|
||||
unit_price: 100,
|
||||
detail: {
|
||||
quantity: 2,
|
||||
order_id: "1",
|
||||
delivered_quantity: 1,
|
||||
shipped_quantity: 1,
|
||||
fulfilled_quantity: 1,
|
||||
return_requested_quantity: "1",
|
||||
@@ -289,10 +315,13 @@ describe("Order Return - Actions", function () {
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
order_id: "1",
|
||||
quantity: 3,
|
||||
unit_price: 20,
|
||||
detail: {
|
||||
quantity: 3,
|
||||
order_id: "1",
|
||||
delivered_quantity: 1,
|
||||
shipped_quantity: 3,
|
||||
fulfilled_quantity: 3,
|
||||
return_requested_quantity: "0",
|
||||
|
||||
@@ -64,6 +64,7 @@ import {
|
||||
import {
|
||||
CreateOrderChangeDTO,
|
||||
CreateOrderItemDTO,
|
||||
UpdateReturnReasonDTO,
|
||||
CreateOrderLineItemDTO,
|
||||
CreateOrderLineItemTaxLineDTO,
|
||||
CreateOrderShippingMethodDTO,
|
||||
@@ -73,7 +74,6 @@ import {
|
||||
UpdateOrderLineItemTaxLineDTO,
|
||||
UpdateOrderShippingMethodTaxLineDTO,
|
||||
} from "@types"
|
||||
import { UpdateReturnReasonDTO } from "src/types/return-reason"
|
||||
import { joinerConfig } from "../joiner-config"
|
||||
import {
|
||||
applyChangesToOrder,
|
||||
|
||||
@@ -12,6 +12,7 @@ export * from "./shipping-method-adjustment"
|
||||
export * from "./shipping-method-tax-line"
|
||||
export * from "./transaction"
|
||||
export * from "./utils"
|
||||
export * from "./return-reason"
|
||||
|
||||
export type InitializeModuleInjectableDependencies = {
|
||||
logger?: Logger
|
||||
|
||||
Reference in New Issue
Block a user