@darkpos/pricing 1.0.62 → 1.0.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__TEST__/modifier.test.js +487 -0
- package/__TEST__/order/addItem.test.js +0 -1
- package/__TEST__/order/order.test.js +64 -0
- package/__TEST__/order/validateConditionsCalculate.test.js +52 -8
- package/lib/item/getLastLocation.js +30 -0
- package/lib/item/getModifiersBySingleValueId.js +11 -0
- package/lib/item/index.js +4 -0
- package/lib/modifier/areConditionsMet.js +2 -2
- package/lib/modifier/contains.js +3 -1
- package/lib/modifier/index.js +2 -2
- package/lib/modifier/{validateDateDaysDiff.js → validateDateHoursDiff.js} +9 -8
- package/lib/order/addItemModifier.js +24 -0
- package/lib/order/getLastLocation.js +28 -0
- package/lib/order/index.js +2 -0
- package/lib/order/removeItemModifier.js +12 -4
- package/package.json +3 -2
|
@@ -193,4 +193,491 @@ describe('Modifier actions', () => {
|
|
|
193
193
|
expect(error).toEqual('');
|
|
194
194
|
expect(updatedOrder2).toEqual(order);
|
|
195
195
|
});
|
|
196
|
+
|
|
197
|
+
test('CU-86dum5w1q Should not allow more than 1 child modifier with the same singleParentGroupId', () => {
|
|
198
|
+
const params = {
|
|
199
|
+
itemIndex: 0,
|
|
200
|
+
modifier: {
|
|
201
|
+
_id: '62cdbfd01ee1b400193281e1',
|
|
202
|
+
attributes: [],
|
|
203
|
+
cost: 0,
|
|
204
|
+
tags: [],
|
|
205
|
+
included: false,
|
|
206
|
+
direct: true,
|
|
207
|
+
hidden: false,
|
|
208
|
+
print: true,
|
|
209
|
+
required: false,
|
|
210
|
+
recommended: false,
|
|
211
|
+
default: false,
|
|
212
|
+
addModifiers: [],
|
|
213
|
+
delModifiers: [],
|
|
214
|
+
_hidden: false,
|
|
215
|
+
_isDeleted: false,
|
|
216
|
+
modifierId: null,
|
|
217
|
+
name: 'Dark Golden Rod',
|
|
218
|
+
sku: '',
|
|
219
|
+
description: 'Color: Orange',
|
|
220
|
+
group: 'Color',
|
|
221
|
+
type: '',
|
|
222
|
+
color: '#b8860b',
|
|
223
|
+
backgroundColor: '',
|
|
224
|
+
icon: '',
|
|
225
|
+
url: '',
|
|
226
|
+
order: 0,
|
|
227
|
+
code: '',
|
|
228
|
+
conditions: null,
|
|
229
|
+
compute: null,
|
|
230
|
+
_accountId: '62cdbfcdaaf93c00193d2dd3',
|
|
231
|
+
_storeId: '62cdbfce1ee1b40019328156',
|
|
232
|
+
_createdAt: '2022-07-12T18:39:18.038Z',
|
|
233
|
+
_updatedAt: '2022-07-12T18:39:18.038Z',
|
|
234
|
+
__typename: 'Modifier',
|
|
235
|
+
properties: { singleValueGroupId: '62cdbfd01ee1b4001932816a' },
|
|
236
|
+
},
|
|
237
|
+
order: {
|
|
238
|
+
_id: '67b4fb03c2d2f55164464c51',
|
|
239
|
+
parentId: null,
|
|
240
|
+
isParent: false,
|
|
241
|
+
subTotal: 213,
|
|
242
|
+
tax: 0,
|
|
243
|
+
modifiers: [],
|
|
244
|
+
discount: 0,
|
|
245
|
+
total: 213,
|
|
246
|
+
description: '',
|
|
247
|
+
displayId: '',
|
|
248
|
+
type: '',
|
|
249
|
+
location: {},
|
|
250
|
+
status: {
|
|
251
|
+
order: 'open',
|
|
252
|
+
kitchen: 'open',
|
|
253
|
+
delivery: 'none',
|
|
254
|
+
detailed: true,
|
|
255
|
+
},
|
|
256
|
+
attributes: [],
|
|
257
|
+
properties: {},
|
|
258
|
+
fee: 0,
|
|
259
|
+
user: null,
|
|
260
|
+
items: [
|
|
261
|
+
{
|
|
262
|
+
location: {},
|
|
263
|
+
status: {
|
|
264
|
+
picked: { value: false, date: '' },
|
|
265
|
+
paid: { value: false, date: '' },
|
|
266
|
+
tracker: [],
|
|
267
|
+
},
|
|
268
|
+
name: '2pc Dress with Long Jacket2',
|
|
269
|
+
description: 'a long jacket.',
|
|
270
|
+
pieces: 2,
|
|
271
|
+
modifiersTotalAmount: 0,
|
|
272
|
+
total: 213,
|
|
273
|
+
totalPaid: 0,
|
|
274
|
+
price: 213,
|
|
275
|
+
quantity: 1,
|
|
276
|
+
path: ',67213668c4b950f2f3c41e64,672136a0f3116216ca955091,',
|
|
277
|
+
notes: [],
|
|
278
|
+
serial: null,
|
|
279
|
+
sku: '',
|
|
280
|
+
modifiers: [
|
|
281
|
+
{
|
|
282
|
+
_id: '67b4fb13c2d2f55164464c55',
|
|
283
|
+
attributes: ['group'],
|
|
284
|
+
modifierId: '62cdbfd01ee1b4001932816a',
|
|
285
|
+
_parentId: null,
|
|
286
|
+
locked: false,
|
|
287
|
+
name: 'White',
|
|
288
|
+
sku: '',
|
|
289
|
+
description: 'Color: White',
|
|
290
|
+
group: 'Color',
|
|
291
|
+
type: null,
|
|
292
|
+
tags: ['default', 'all'],
|
|
293
|
+
order: null,
|
|
294
|
+
included: false,
|
|
295
|
+
direct: true,
|
|
296
|
+
hidden: false,
|
|
297
|
+
print: false,
|
|
298
|
+
required: true,
|
|
299
|
+
recommended: false,
|
|
300
|
+
default: false,
|
|
301
|
+
code: null,
|
|
302
|
+
properties: {
|
|
303
|
+
override: null,
|
|
304
|
+
group: {
|
|
305
|
+
displayType: 'card',
|
|
306
|
+
includeInGroup: true,
|
|
307
|
+
singleValue: true,
|
|
308
|
+
compact: false,
|
|
309
|
+
enableAutoPopup: true,
|
|
310
|
+
displayReplacePrompt: true,
|
|
311
|
+
promptMessage: '',
|
|
312
|
+
modifiers: [],
|
|
313
|
+
items: [],
|
|
314
|
+
values: ['RegularItem'],
|
|
315
|
+
manualModifiers: 'test1, asd,123',
|
|
316
|
+
},
|
|
317
|
+
sort: null,
|
|
318
|
+
label: {
|
|
319
|
+
text: 'White Label',
|
|
320
|
+
align: 'center',
|
|
321
|
+
backgroundColor: 'rgba(76,175,80,1)',
|
|
322
|
+
},
|
|
323
|
+
color: 'rgba(0,150,136,1)',
|
|
324
|
+
},
|
|
325
|
+
_computed: { amount: 0, description: 'White' },
|
|
326
|
+
conditions: { valid: true },
|
|
327
|
+
compute: null,
|
|
328
|
+
_createdAt: '2022-07-12T18:39:17.922Z',
|
|
329
|
+
_updatedAt: '2025-02-17T21:23:21.422Z',
|
|
330
|
+
addModifiers: [],
|
|
331
|
+
delModifiers: [],
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
_id: '67b4fb13c2d2f55164464c56',
|
|
335
|
+
attributes: ['group'],
|
|
336
|
+
modifierId: '62cdbfd01ee1b400193281b1',
|
|
337
|
+
_parentId: null,
|
|
338
|
+
locked: false,
|
|
339
|
+
name: 'Red',
|
|
340
|
+
sku: '',
|
|
341
|
+
description: 'Color: Red',
|
|
342
|
+
group: 'Color',
|
|
343
|
+
type: null,
|
|
344
|
+
tags: ['default', 'all'],
|
|
345
|
+
order: null,
|
|
346
|
+
included: false,
|
|
347
|
+
direct: true,
|
|
348
|
+
hidden: false,
|
|
349
|
+
print: false,
|
|
350
|
+
required: true,
|
|
351
|
+
recommended: false,
|
|
352
|
+
default: false,
|
|
353
|
+
code: null,
|
|
354
|
+
properties: {
|
|
355
|
+
group: {
|
|
356
|
+
displayType: 'list',
|
|
357
|
+
modifiers: [],
|
|
358
|
+
items: [],
|
|
359
|
+
compact: null,
|
|
360
|
+
includeInGroup: true,
|
|
361
|
+
singleValue: null,
|
|
362
|
+
enableAutoPopup: true,
|
|
363
|
+
displayReplacePrompt: null,
|
|
364
|
+
manualModifiers: '',
|
|
365
|
+
},
|
|
366
|
+
label: { text: '' },
|
|
367
|
+
sort: null,
|
|
368
|
+
color: 'rgba(255,0,0,1)',
|
|
369
|
+
},
|
|
370
|
+
_computed: { amount: 0, description: 'Red' },
|
|
371
|
+
conditions: { valid: true },
|
|
372
|
+
compute: null,
|
|
373
|
+
_createdAt: '2022-07-12T18:39:17.990Z',
|
|
374
|
+
_updatedAt: '2025-02-12T19:26:05.372Z',
|
|
375
|
+
addModifiers: [],
|
|
376
|
+
delModifiers: [],
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
_id: '67b4fb14c2d2f55164464c57',
|
|
380
|
+
attributes: [],
|
|
381
|
+
cost: 0,
|
|
382
|
+
tags: [],
|
|
383
|
+
included: false,
|
|
384
|
+
direct: true,
|
|
385
|
+
hidden: false,
|
|
386
|
+
print: true,
|
|
387
|
+
required: false,
|
|
388
|
+
recommended: false,
|
|
389
|
+
default: false,
|
|
390
|
+
addModifiers: [],
|
|
391
|
+
delModifiers: [],
|
|
392
|
+
_hidden: false,
|
|
393
|
+
_isDeleted: false,
|
|
394
|
+
modifierId: '62cdbfd01ee1b40019328188',
|
|
395
|
+
name: 'Linen',
|
|
396
|
+
sku: '',
|
|
397
|
+
description: 'Color: White',
|
|
398
|
+
group: 'Color',
|
|
399
|
+
type: '',
|
|
400
|
+
color: '#faf0e6',
|
|
401
|
+
backgroundColor: '',
|
|
402
|
+
icon: '',
|
|
403
|
+
url: '',
|
|
404
|
+
order: 0,
|
|
405
|
+
code: '',
|
|
406
|
+
conditions: { valid: true },
|
|
407
|
+
compute: null,
|
|
408
|
+
_accountId: '62cdbfcdaaf93c00193d2dd3',
|
|
409
|
+
_storeId: '62cdbfce1ee1b40019328156',
|
|
410
|
+
_createdAt: '2022-07-12T18:39:18.038Z',
|
|
411
|
+
_updatedAt: '2022-07-12T18:39:18.038Z',
|
|
412
|
+
__typename: 'Modifier',
|
|
413
|
+
properties: { singleValueGroupId: '62cdbfd01ee1b4001932816a' },
|
|
414
|
+
_computed: { amount: 0, description: 'Linen' },
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
_id: '67b4fb15c2d2f55164464c58',
|
|
418
|
+
attributes: [],
|
|
419
|
+
cost: 0,
|
|
420
|
+
tags: null,
|
|
421
|
+
included: false,
|
|
422
|
+
direct: true,
|
|
423
|
+
hidden: false,
|
|
424
|
+
print: false,
|
|
425
|
+
required: false,
|
|
426
|
+
recommended: false,
|
|
427
|
+
default: false,
|
|
428
|
+
addModifiers: [],
|
|
429
|
+
delModifiers: [],
|
|
430
|
+
_hidden: false,
|
|
431
|
+
_isDeleted: false,
|
|
432
|
+
modifierId: '62cdbfd01ee1b400193281b2',
|
|
433
|
+
name: 'Dark Red',
|
|
434
|
+
sku: '',
|
|
435
|
+
description: 'Color: Red',
|
|
436
|
+
group: 'Color',
|
|
437
|
+
type: null,
|
|
438
|
+
color: '#8b0000',
|
|
439
|
+
url: '',
|
|
440
|
+
conditions: { valid: true },
|
|
441
|
+
backgroundColor: null,
|
|
442
|
+
code: null,
|
|
443
|
+
compute: null,
|
|
444
|
+
icon: null,
|
|
445
|
+
order: null,
|
|
446
|
+
properties: { singleValueGroupId: null },
|
|
447
|
+
_accountId: '62cdbfcdaaf93c00193d2dd3',
|
|
448
|
+
_storeId: '62cdbfce1ee1b40019328156',
|
|
449
|
+
_createdAt: '2022-07-12T18:39:17.985Z',
|
|
450
|
+
_updatedAt: '2022-07-12T18:39:17.985Z',
|
|
451
|
+
__typename: 'Modifier',
|
|
452
|
+
_computed: { amount: 0, description: 'Dark Red' },
|
|
453
|
+
},
|
|
454
|
+
],
|
|
455
|
+
_id: '67b4fb13c2d2f55164464c54',
|
|
456
|
+
_updatedAt: '2025-02-17T20:59:00.398Z',
|
|
457
|
+
_createdAt: '2022-07-12T18:39:17.318Z',
|
|
458
|
+
weight: null,
|
|
459
|
+
properties: {
|
|
460
|
+
label: { text: '', align: 'center', backgroundColor: null },
|
|
461
|
+
url: null,
|
|
462
|
+
color: 'rgba(254,86,33,1)',
|
|
463
|
+
iconName: 'ActivitySquare',
|
|
464
|
+
basePrice: 213,
|
|
465
|
+
},
|
|
466
|
+
hasInventory: true,
|
|
467
|
+
inventoryType: 'push',
|
|
468
|
+
category: { _id: '66db73e570fdebea682d28e2' },
|
|
469
|
+
__typename: 'OrderItem',
|
|
470
|
+
priceLevels: [
|
|
471
|
+
{ value: 213, tags: ['default'] },
|
|
472
|
+
{ value: 200, tags: ['vip'] },
|
|
473
|
+
{ value: 12, tags: ['wholesale'] },
|
|
474
|
+
{ value: 113, tags: ['default', 'press only'] },
|
|
475
|
+
{ value: 100, tags: ['vip', 'press only'] },
|
|
476
|
+
{ value: 0, tags: ['wholesale', 'press only'] },
|
|
477
|
+
],
|
|
478
|
+
costLevels: [],
|
|
479
|
+
itemId: '62cdbfd01ee1b4001932821a',
|
|
480
|
+
categoryId: '66db73e570fdebea682d28e2',
|
|
481
|
+
menuRuleId: '672136a9f3116216ca955092',
|
|
482
|
+
subTotals: {
|
|
483
|
+
_included: 0,
|
|
484
|
+
_xincluded: 0,
|
|
485
|
+
_direct: 0,
|
|
486
|
+
_xdirect: 0,
|
|
487
|
+
_simple: 213,
|
|
488
|
+
_actual: 213,
|
|
489
|
+
},
|
|
490
|
+
},
|
|
491
|
+
],
|
|
492
|
+
notes: [],
|
|
493
|
+
customer: {
|
|
494
|
+
_id: '66a3d7d366107c7369873980',
|
|
495
|
+
username: '',
|
|
496
|
+
firstName: 'Esteban',
|
|
497
|
+
lastName: 'Mathieu',
|
|
498
|
+
description: '',
|
|
499
|
+
attributes: [],
|
|
500
|
+
properties: {
|
|
501
|
+
charge: {
|
|
502
|
+
enabled: true,
|
|
503
|
+
walletCard: {
|
|
504
|
+
customerToken: 'cus_RCWJ73mmqUM5Td',
|
|
505
|
+
cardToken: 'card_1QKLmQFS0LoOx3AS7L9LWHUt',
|
|
506
|
+
},
|
|
507
|
+
},
|
|
508
|
+
billing: { name: 'Andreparent Pinto', enabled: false, limit: null },
|
|
509
|
+
events: [],
|
|
510
|
+
relationships: [],
|
|
511
|
+
defaultStore: '62cdbfce1ee1b40019328156',
|
|
512
|
+
gender: '',
|
|
513
|
+
company: 'WWE',
|
|
514
|
+
profilePic:
|
|
515
|
+
'https://res.cloudinary.com/darkpos/image/upload/v1731358649/67326fb8260f353e43272369.jpg',
|
|
516
|
+
starch: '62cdbfd01ee1b4001932822e',
|
|
517
|
+
packing: '66cd14a4b74b7da4b9f195d3',
|
|
518
|
+
cycle: false,
|
|
519
|
+
declineNotifications: false,
|
|
520
|
+
escExempt: false,
|
|
521
|
+
route: false,
|
|
522
|
+
taxExempt: false,
|
|
523
|
+
term: '',
|
|
524
|
+
customFieldTest: '',
|
|
525
|
+
},
|
|
526
|
+
tags: ['default'],
|
|
527
|
+
status: '',
|
|
528
|
+
parent: { tags: ['default'] },
|
|
529
|
+
parentId: '66f174ddc289cb1302b2eb8e',
|
|
530
|
+
loyalty: null,
|
|
531
|
+
wallet: [
|
|
532
|
+
{
|
|
533
|
+
isDefault: true,
|
|
534
|
+
provider: 'credit-card-ppec',
|
|
535
|
+
customerToken: 'cus_R5fHSveVoEOdrg',
|
|
536
|
+
cardToken: 'card_1QDTwmFS0LoOx3ASEGiVK7nD',
|
|
537
|
+
cards: [
|
|
538
|
+
{
|
|
539
|
+
_id: 'card_1QfQNwFS0LoOx3AS3Zp8jIdx',
|
|
540
|
+
name: 'Andre S Dark',
|
|
541
|
+
token: 'card_1QfQNwFS0LoOx3AS3Zp8jIdx',
|
|
542
|
+
last4: '4444',
|
|
543
|
+
month: '12',
|
|
544
|
+
year: '2033',
|
|
545
|
+
billingAddress: 'Rua 6 130 c2',
|
|
546
|
+
zipCode: '21478',
|
|
547
|
+
type: 'card',
|
|
548
|
+
amount: null,
|
|
549
|
+
pin: null,
|
|
550
|
+
number: null,
|
|
551
|
+
},
|
|
552
|
+
],
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
isDefault: false,
|
|
556
|
+
provider: 'darkpos',
|
|
557
|
+
customerToken: '673f93ddbb1a78190bb48361',
|
|
558
|
+
cardToken: null,
|
|
559
|
+
cards: [
|
|
560
|
+
{
|
|
561
|
+
_id: '673f93ddbb1a78190bb48362',
|
|
562
|
+
name: null,
|
|
563
|
+
token: '673f93ddbb1a78190bb48362',
|
|
564
|
+
last4: null,
|
|
565
|
+
month: null,
|
|
566
|
+
year: null,
|
|
567
|
+
billingAddress: null,
|
|
568
|
+
zipCode: null,
|
|
569
|
+
type: 'credit',
|
|
570
|
+
amount: 0,
|
|
571
|
+
pin: null,
|
|
572
|
+
number: null,
|
|
573
|
+
},
|
|
574
|
+
],
|
|
575
|
+
},
|
|
576
|
+
],
|
|
577
|
+
modifiers: [],
|
|
578
|
+
addresses: [
|
|
579
|
+
{
|
|
580
|
+
address1: '21 Jump Street',
|
|
581
|
+
address2: '',
|
|
582
|
+
city: 'LA',
|
|
583
|
+
state: 'California',
|
|
584
|
+
zip: '',
|
|
585
|
+
country: null,
|
|
586
|
+
primary: true,
|
|
587
|
+
type: null,
|
|
588
|
+
description: null,
|
|
589
|
+
location: { lat: 0, lng: 0 },
|
|
590
|
+
},
|
|
591
|
+
],
|
|
592
|
+
contacts: [],
|
|
593
|
+
notes: [],
|
|
594
|
+
_accountId: '62cdbfcdaaf93c00193d2dd3',
|
|
595
|
+
_storeId: '62cdbfce1ee1b40019328156',
|
|
596
|
+
_isDeleted: false,
|
|
597
|
+
_deletedAt: null,
|
|
598
|
+
_updatedAt: '2025-02-17T20:59:00.355Z',
|
|
599
|
+
_createdAt: '2024-07-26T17:07:41.027Z',
|
|
600
|
+
isEmbedded: true,
|
|
601
|
+
},
|
|
602
|
+
start: {
|
|
603
|
+
actualDate: '2025-02-18T21:26:27.782Z',
|
|
604
|
+
requestDate: '2025-02-18T21:26:27.782Z',
|
|
605
|
+
__typename: 'OrderStart',
|
|
606
|
+
location: {
|
|
607
|
+
name: 'Tico Store #1',
|
|
608
|
+
locationType: 'store',
|
|
609
|
+
storeId: '62cdbfce1ee1b40019328156',
|
|
610
|
+
},
|
|
611
|
+
},
|
|
612
|
+
end: {
|
|
613
|
+
__typename: 'OrderEnd',
|
|
614
|
+
actualDate: '',
|
|
615
|
+
requestDate: '2025-02-21T21:30:00.000Z',
|
|
616
|
+
location: {
|
|
617
|
+
name: 'Tico Store #1',
|
|
618
|
+
locationType: 'store',
|
|
619
|
+
storeId: '62cdbfce1ee1b40019328156',
|
|
620
|
+
},
|
|
621
|
+
},
|
|
622
|
+
_storeId: '',
|
|
623
|
+
__typename: 'Order',
|
|
624
|
+
isOrderNew: true,
|
|
625
|
+
subTotals: {},
|
|
626
|
+
},
|
|
627
|
+
force: true,
|
|
628
|
+
originalItem: {
|
|
629
|
+
_id: '62cdbfd01ee1b4001932821a',
|
|
630
|
+
_updatedAt: '2025-02-17T20:59:00.398Z',
|
|
631
|
+
_createdAt: '2022-07-12T18:39:17.318Z',
|
|
632
|
+
name: '2pc Dress with Long Jacket2',
|
|
633
|
+
description: 'a long jacket.',
|
|
634
|
+
pieces: 2,
|
|
635
|
+
weight: 0,
|
|
636
|
+
properties: {
|
|
637
|
+
label: { text: '', align: 'center', backgroundColor: null },
|
|
638
|
+
url: null,
|
|
639
|
+
color: 'rgba(254,86,33,1)',
|
|
640
|
+
iconName: 'ActivitySquare',
|
|
641
|
+
},
|
|
642
|
+
sku: '',
|
|
643
|
+
hasInventory: true,
|
|
644
|
+
inventoryType: 'push',
|
|
645
|
+
quantity: 67,
|
|
646
|
+
category: { _id: '66db73e570fdebea682d28e2' },
|
|
647
|
+
__typename: 'Item',
|
|
648
|
+
modifiers: [],
|
|
649
|
+
priceLevels: [
|
|
650
|
+
{ value: 213, tags: ['default'] },
|
|
651
|
+
{ value: 200, tags: ['vip'] },
|
|
652
|
+
{ value: 12, tags: ['wholesale'] },
|
|
653
|
+
{ value: 113, tags: ['default', 'press only'] },
|
|
654
|
+
{ value: 100, tags: ['vip', 'press only'] },
|
|
655
|
+
{ value: 0, tags: ['wholesale', 'press only'] },
|
|
656
|
+
],
|
|
657
|
+
costLevels: [],
|
|
658
|
+
},
|
|
659
|
+
};
|
|
660
|
+
|
|
661
|
+
const updatedOrder = pricingService.order.addItemModifier({
|
|
662
|
+
order: params.order,
|
|
663
|
+
modifier: params.modifier,
|
|
664
|
+
itemIndex: params.itemIndex,
|
|
665
|
+
});
|
|
666
|
+
|
|
667
|
+
expect(updatedOrder.items[0].modifiers.length).toEqual(4);
|
|
668
|
+
expect(updatedOrder.items[0].modifiers[0].name).toEqual('White');
|
|
669
|
+
expect(updatedOrder.items[0].modifiers[1].name).toEqual('Red');
|
|
670
|
+
expect(updatedOrder.items[0].modifiers[2].name).toEqual('Dark Red');
|
|
671
|
+
expect(updatedOrder.items[0].modifiers[2].properties).toEqual(
|
|
672
|
+
expect.objectContaining({
|
|
673
|
+
singleValueGroupId: null,
|
|
674
|
+
})
|
|
675
|
+
);
|
|
676
|
+
expect(updatedOrder.items[0].modifiers[3].name).toEqual('Dark Golden Rod');
|
|
677
|
+
expect(updatedOrder.items[0].modifiers[3].properties).toEqual(
|
|
678
|
+
expect.objectContaining({
|
|
679
|
+
singleValueGroupId: '62cdbfd01ee1b4001932816a',
|
|
680
|
+
})
|
|
681
|
+
);
|
|
682
|
+
});
|
|
196
683
|
});
|
|
@@ -3170,4 +3170,68 @@ describe('Order actions', () => {
|
|
|
3170
3170
|
},
|
|
3171
3171
|
});
|
|
3172
3172
|
});
|
|
3173
|
+
|
|
3174
|
+
test('should return the latest location= tracker', () => {
|
|
3175
|
+
const status = {
|
|
3176
|
+
assembled: { location: '1', date: '2024-02-25T12:00:00Z' },
|
|
3177
|
+
tracker: { location: 'Truck', date: '2024-02-26T12:00:00Z' },
|
|
3178
|
+
racked: { location: '%AB', date: '2024-02-24T15:00:00Z' },
|
|
3179
|
+
};
|
|
3180
|
+
expect(pricingService.order.getLastLocation({ status })).toEqual({
|
|
3181
|
+
location: 'Truck',
|
|
3182
|
+
date: '2024-02-26T12:00:00Z',
|
|
3183
|
+
isTracker: true,
|
|
3184
|
+
});
|
|
3185
|
+
});
|
|
3186
|
+
|
|
3187
|
+
test('should return the latest location= assembled', () => {
|
|
3188
|
+
const status = {
|
|
3189
|
+
assembled: { location: '1', date: '2024-02-27T12:00:00Z' },
|
|
3190
|
+
tracker: { location: 'Truck', date: '2024-02-26T12:00:00Z' },
|
|
3191
|
+
racked: { location: '%AB', date: '2024-02-25T15:00:00Z' },
|
|
3192
|
+
};
|
|
3193
|
+
expect(pricingService.order.getLastLocation({ status })).toEqual({
|
|
3194
|
+
location: '1',
|
|
3195
|
+
date: '2024-02-27T12:00:00Z',
|
|
3196
|
+
isAssembled: true,
|
|
3197
|
+
prefix: 'spot',
|
|
3198
|
+
});
|
|
3199
|
+
});
|
|
3200
|
+
|
|
3201
|
+
test('should return the latest location= racked', () => {
|
|
3202
|
+
const status = {
|
|
3203
|
+
assembled: { location: '1', date: '2024-02-25T12:00:00Z' },
|
|
3204
|
+
tracker: { location: 'Truck', date: '2024-02-26T12:00:00Z' },
|
|
3205
|
+
racked: { location: '%AB', date: '2024-02-27T15:00:00Z' },
|
|
3206
|
+
};
|
|
3207
|
+
expect(pricingService.order.getLastLocation({ status })).toEqual({
|
|
3208
|
+
location: '%AB',
|
|
3209
|
+
date: '2024-02-27T15:00:00Z',
|
|
3210
|
+
isRacked: true,
|
|
3211
|
+
prefix: 'rack',
|
|
3212
|
+
});
|
|
3213
|
+
});
|
|
3214
|
+
|
|
3215
|
+
test('should handle null values correctly and still return the latest location', () => {
|
|
3216
|
+
const status = {
|
|
3217
|
+
assembled: null,
|
|
3218
|
+
tracker: { location: 'Truck', date: '2024-02-26T12:00:00Z' },
|
|
3219
|
+
racked: { location: '%AB', date: '2024-02-27T15:00:00Z' },
|
|
3220
|
+
};
|
|
3221
|
+
expect(pricingService.order.getLastLocation({ status })).toEqual({
|
|
3222
|
+
location: '%AB',
|
|
3223
|
+
date: '2024-02-27T15:00:00Z',
|
|
3224
|
+
isRacked: true,
|
|
3225
|
+
prefix: 'rack',
|
|
3226
|
+
});
|
|
3227
|
+
});
|
|
3228
|
+
|
|
3229
|
+
test('should return null if all locations are missing or null', () => {
|
|
3230
|
+
const status = {
|
|
3231
|
+
assembled: null,
|
|
3232
|
+
tracker: null,
|
|
3233
|
+
racked: null,
|
|
3234
|
+
};
|
|
3235
|
+
expect(pricingService.order.getLastLocation({ status })).toEqual(null);
|
|
3236
|
+
});
|
|
3173
3237
|
});
|
|
@@ -154,16 +154,16 @@ describe('Conditions not met for the item', () => {
|
|
|
154
154
|
expect(calculatedOrder).toHaveProperty('total', 70);
|
|
155
155
|
expect(calculatedOrder).toHaveProperty('subTotal', 100);
|
|
156
156
|
});
|
|
157
|
-
test('#5:
|
|
157
|
+
test('#5: endDateHours condition is not met, item price remains the same', () => {
|
|
158
158
|
const order = {
|
|
159
159
|
id: 'ord-123',
|
|
160
160
|
items: [],
|
|
161
161
|
modifiers: [],
|
|
162
162
|
start: {
|
|
163
|
-
requestDate:
|
|
163
|
+
requestDate: '2025-02-14T17:00:00.000',
|
|
164
164
|
},
|
|
165
165
|
end: {
|
|
166
|
-
requestDate:
|
|
166
|
+
requestDate: '2025-02-14T20:00:00.000',
|
|
167
167
|
},
|
|
168
168
|
};
|
|
169
169
|
const item = {
|
|
@@ -177,7 +177,7 @@ describe('Conditions not met for the item', () => {
|
|
|
177
177
|
conditions: {
|
|
178
178
|
rules: [
|
|
179
179
|
{
|
|
180
|
-
key: '
|
|
180
|
+
key: 'endDateHours',
|
|
181
181
|
value: 5,
|
|
182
182
|
operand: '$gt',
|
|
183
183
|
},
|
|
@@ -196,16 +196,16 @@ describe('Conditions not met for the item', () => {
|
|
|
196
196
|
expect(calculatedOrder).toHaveProperty('total', 100);
|
|
197
197
|
expect(calculatedOrder).toHaveProperty('subTotal', 100);
|
|
198
198
|
});
|
|
199
|
-
test('#6:
|
|
199
|
+
test('#6: endDateHours condition is met, item total is updated', () => {
|
|
200
200
|
const order = {
|
|
201
201
|
id: 'ord-123',
|
|
202
202
|
items: [],
|
|
203
203
|
modifiers: [],
|
|
204
204
|
start: {
|
|
205
|
-
requestDate:
|
|
205
|
+
requestDate: '2025-02-14T17:00:00.000',
|
|
206
206
|
},
|
|
207
207
|
end: {
|
|
208
|
-
requestDate:
|
|
208
|
+
requestDate: '2025-02-14T23:00:00.000',
|
|
209
209
|
},
|
|
210
210
|
};
|
|
211
211
|
const item = {
|
|
@@ -224,7 +224,7 @@ describe('Conditions not met for the item', () => {
|
|
|
224
224
|
conditions: {
|
|
225
225
|
rules: [
|
|
226
226
|
{
|
|
227
|
-
key: '
|
|
227
|
+
key: 'endDateHours',
|
|
228
228
|
value: 5,
|
|
229
229
|
operand: '$gt',
|
|
230
230
|
},
|
|
@@ -235,6 +235,50 @@ describe('Conditions not met for the item', () => {
|
|
|
235
235
|
const { calculate } = pricingService.order;
|
|
236
236
|
// Calculate the order
|
|
237
237
|
const calculatedOrder = calculate(order);
|
|
238
|
+
|
|
239
|
+
expect(calculatedOrder).toHaveProperty('total', 70);
|
|
240
|
+
expect(calculatedOrder).toHaveProperty('subTotal', 100);
|
|
241
|
+
});
|
|
242
|
+
test('#6.5: endDateHours condition is met with gte, item total is updated', () => {
|
|
243
|
+
const order = {
|
|
244
|
+
id: 'ord-123',
|
|
245
|
+
items: [],
|
|
246
|
+
modifiers: [],
|
|
247
|
+
start: {
|
|
248
|
+
requestDate: '2025-02-14T17:00:00.000',
|
|
249
|
+
},
|
|
250
|
+
end: {
|
|
251
|
+
requestDate: '2025-02-14T22:00:00.000',
|
|
252
|
+
},
|
|
253
|
+
};
|
|
254
|
+
const item = {
|
|
255
|
+
quantity: 1,
|
|
256
|
+
itemId: '123',
|
|
257
|
+
price: 100,
|
|
258
|
+
modifiers: [],
|
|
259
|
+
};
|
|
260
|
+
order.items.push(item);
|
|
261
|
+
const modifier = {
|
|
262
|
+
compute: {
|
|
263
|
+
amount: 30,
|
|
264
|
+
type: 'fixed',
|
|
265
|
+
action: 'subtract',
|
|
266
|
+
},
|
|
267
|
+
conditions: {
|
|
268
|
+
rules: [
|
|
269
|
+
{
|
|
270
|
+
key: 'endDateHours',
|
|
271
|
+
value: 5,
|
|
272
|
+
operand: '$gte',
|
|
273
|
+
},
|
|
274
|
+
],
|
|
275
|
+
},
|
|
276
|
+
};
|
|
277
|
+
item.modifiers.push(modifier);
|
|
278
|
+
const { calculate } = pricingService.order;
|
|
279
|
+
// Calculate the order
|
|
280
|
+
const calculatedOrder = calculate(order);
|
|
281
|
+
|
|
238
282
|
expect(calculatedOrder).toHaveProperty('total', 70);
|
|
239
283
|
expect(calculatedOrder).toHaveProperty('subTotal', 100);
|
|
240
284
|
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module.exports = () =>
|
|
2
|
+
function getLastLocation(item) {
|
|
3
|
+
if (!item || !item.status) return null;
|
|
4
|
+
|
|
5
|
+
const { assembled = {}, tracker = [], racked = {} } = item.status;
|
|
6
|
+
|
|
7
|
+
let latestLocation =
|
|
8
|
+
Array.isArray(tracker) && tracker.length > 0
|
|
9
|
+
? { ...tracker[tracker.length - 1], isTracker: true }
|
|
10
|
+
: {};
|
|
11
|
+
|
|
12
|
+
if (
|
|
13
|
+
assembled &&
|
|
14
|
+
assembled.date &&
|
|
15
|
+
(!latestLocation.date ||
|
|
16
|
+
new Date(assembled.date) > new Date(latestLocation.date))
|
|
17
|
+
) {
|
|
18
|
+
latestLocation = { ...assembled, isAssembled: true, prefix: 'spot' };
|
|
19
|
+
}
|
|
20
|
+
if (
|
|
21
|
+
racked &&
|
|
22
|
+
racked.date &&
|
|
23
|
+
(!latestLocation.date ||
|
|
24
|
+
new Date(racked.date) > new Date(latestLocation.date))
|
|
25
|
+
) {
|
|
26
|
+
latestLocation = { ...racked, isRacked: true, prefix: 'rack' };
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return Object.keys(latestLocation).length !== 0 ? latestLocation : null;
|
|
30
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
module.exports = ({ modifierActions }) =>
|
|
2
|
+
function getModifiersBySingleValueId({ item, singleValueGroupId }) {
|
|
3
|
+
if (!singleValueGroupId) return [];
|
|
4
|
+
|
|
5
|
+
if (!item || !item.modifiers) return [];
|
|
6
|
+
return item.modifiers.filter(
|
|
7
|
+
each =>
|
|
8
|
+
modifierActions.getProperty(each, 'singleValueGroupId') ===
|
|
9
|
+
singleValueGroupId
|
|
10
|
+
);
|
|
11
|
+
};
|
package/lib/item/index.js
CHANGED
|
@@ -46,6 +46,8 @@ const getTotalNeareastDifference = require('./getTotalNeareastDifference');
|
|
|
46
46
|
const getNoteTags = require('./getNoteTags');
|
|
47
47
|
const getBasePrice = require('./getBasePrice');
|
|
48
48
|
const removeModifiersByQuantity = require('./removeModifiersByQuantity');
|
|
49
|
+
const getModifiersBySingleValueId = require('./getModifiersBySingleValueId');
|
|
50
|
+
const getLastLocation = require('./getLastLocation');
|
|
49
51
|
|
|
50
52
|
const itemActions = (deps = {}) => {
|
|
51
53
|
const actions = {};
|
|
@@ -105,6 +107,8 @@ const itemActions = (deps = {}) => {
|
|
|
105
107
|
getNoteTags: getNoteTags(innerDeps),
|
|
106
108
|
getBasePrice: getBasePrice(innerDeps),
|
|
107
109
|
removeModifiersByQuantity: removeModifiersByQuantity(innerDeps),
|
|
110
|
+
getModifiersBySingleValueId: getModifiersBySingleValueId(innerDeps),
|
|
111
|
+
getLastLocation: getLastLocation(innerDeps),
|
|
108
112
|
});
|
|
109
113
|
|
|
110
114
|
Object.keys(freezedActions).forEach(actionName => {
|
|
@@ -24,8 +24,8 @@ module.exports = ({ actions }) => {
|
|
|
24
24
|
condition.value,
|
|
25
25
|
condition.operand
|
|
26
26
|
);
|
|
27
|
-
case '
|
|
28
|
-
return actions.
|
|
27
|
+
case 'endDateHours':
|
|
28
|
+
return actions.validateDateHoursDiff(
|
|
29
29
|
startRequestDate,
|
|
30
30
|
endRequestDate,
|
|
31
31
|
condition.value,
|
package/lib/modifier/contains.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
module.exports = () =>
|
|
2
2
|
function contains(modifiers = [], modifier = null) {
|
|
3
3
|
if (!modifiers || !modifier) return false;
|
|
4
|
-
return !!modifiers.find(
|
|
4
|
+
return !!modifiers.find(
|
|
5
|
+
each => each.modifierId === modifier._id || each._id === modifier._id
|
|
6
|
+
);
|
|
5
7
|
};
|
package/lib/modifier/index.js
CHANGED
|
@@ -121,7 +121,7 @@ const getGroupedModifierLabels = require('./getGroupedModifierLabels');
|
|
|
121
121
|
const validate = require('./validate');
|
|
122
122
|
const validateNumberCondition = require('./validateNumberCondition');
|
|
123
123
|
const validateRequiredModifiers = require('./validateRequiredModifiers');
|
|
124
|
-
const
|
|
124
|
+
const validateDateHoursDiff = require('./validateDateHoursDiff');
|
|
125
125
|
const validateInArr = require('./validateInArr');
|
|
126
126
|
const isPercentage = require('./isPercentage');
|
|
127
127
|
const getChildren = require('./getChildren');
|
|
@@ -272,7 +272,7 @@ const modifierActions = (deps = {}) => {
|
|
|
272
272
|
validate: validate(innerDeps),
|
|
273
273
|
validateNumberCondition: validateNumberCondition(innerDeps),
|
|
274
274
|
validateRequiredModifiers: validateRequiredModifiers(innerDeps),
|
|
275
|
-
|
|
275
|
+
validateDateHoursDiff: validateDateHoursDiff(innerDeps),
|
|
276
276
|
validateInArr: validateInArr(innerDeps),
|
|
277
277
|
areConditionsMet: areConditionsMet(innerDeps),
|
|
278
278
|
isPercentage: isPercentage(innerDeps),
|
|
@@ -2,7 +2,7 @@ module.exports = () =>
|
|
|
2
2
|
function validateDateDaysDiff(
|
|
3
3
|
startRequestDate,
|
|
4
4
|
endRequestDate,
|
|
5
|
-
conditionNumber,
|
|
5
|
+
conditionNumber, // in hours
|
|
6
6
|
operand
|
|
7
7
|
) {
|
|
8
8
|
if (!conditionNumber && !operand) return true;
|
|
@@ -10,20 +10,21 @@ module.exports = () =>
|
|
|
10
10
|
const diff = Math.abs(
|
|
11
11
|
new Date(endRequestDate) - new Date(startRequestDate)
|
|
12
12
|
);
|
|
13
|
-
const
|
|
13
|
+
const diffHours = Math.ceil(diff / (1000 * 60 * 60));
|
|
14
|
+
|
|
14
15
|
switch (operand) {
|
|
15
16
|
case '$eq':
|
|
16
|
-
return
|
|
17
|
+
return diffHours === conditionNumber;
|
|
17
18
|
case '$ne':
|
|
18
|
-
return
|
|
19
|
+
return diffHours !== conditionNumber;
|
|
19
20
|
case '$gt':
|
|
20
|
-
return
|
|
21
|
+
return diffHours > conditionNumber;
|
|
21
22
|
case '$gte':
|
|
22
|
-
return
|
|
23
|
+
return diffHours >= conditionNumber;
|
|
23
24
|
case '$lt':
|
|
24
|
-
return
|
|
25
|
+
return diffHours < conditionNumber;
|
|
25
26
|
case '$lte':
|
|
26
|
-
return
|
|
27
|
+
return diffHours <= conditionNumber;
|
|
27
28
|
default:
|
|
28
29
|
return false;
|
|
29
30
|
}
|
|
@@ -204,6 +204,30 @@ module.exports = ({ actions, itemActions, modifierActions, utils, _ }) => {
|
|
|
204
204
|
return order;
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
+
const modifiersToRemove = itemActions.getModifiersBySingleValueId({
|
|
208
|
+
item,
|
|
209
|
+
singleValueGroupId: modifierActions.getProperty(
|
|
210
|
+
modifier,
|
|
211
|
+
'singleValueGroupId'
|
|
212
|
+
),
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
if (modifiersToRemove.length > 0) {
|
|
216
|
+
order = modifiersToRemove.reduce(
|
|
217
|
+
(prevVal, modToRemove) => {
|
|
218
|
+
const result = actions.removeItemModifier({
|
|
219
|
+
order: prevVal,
|
|
220
|
+
modifier: modToRemove,
|
|
221
|
+
itemIndex,
|
|
222
|
+
originalItem,
|
|
223
|
+
});
|
|
224
|
+
return result;
|
|
225
|
+
},
|
|
226
|
+
{ ...order }
|
|
227
|
+
);
|
|
228
|
+
item = actions.getSelectedItem({ order, itemIndex });
|
|
229
|
+
}
|
|
230
|
+
|
|
207
231
|
if (
|
|
208
232
|
contains &&
|
|
209
233
|
modifierActions.isCompute(modifier) &&
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
module.exports = () =>
|
|
2
|
+
function getLastLocation(order) {
|
|
3
|
+
if (!order || !order.status) return null;
|
|
4
|
+
|
|
5
|
+
const { assembled = {}, tracker = {}, racked = {} } = order.status;
|
|
6
|
+
|
|
7
|
+
let latestLocation =
|
|
8
|
+
tracker && tracker.date ? { ...tracker, isTracker: true } : {};
|
|
9
|
+
|
|
10
|
+
if (
|
|
11
|
+
assembled &&
|
|
12
|
+
assembled.date &&
|
|
13
|
+
(!latestLocation.date ||
|
|
14
|
+
new Date(assembled.date) > new Date(latestLocation.date))
|
|
15
|
+
) {
|
|
16
|
+
latestLocation = { ...assembled, isAssembled: true, prefix: 'spot' };
|
|
17
|
+
}
|
|
18
|
+
if (
|
|
19
|
+
racked &&
|
|
20
|
+
racked.date &&
|
|
21
|
+
(!latestLocation.date ||
|
|
22
|
+
new Date(racked.date) > new Date(latestLocation.date))
|
|
23
|
+
) {
|
|
24
|
+
latestLocation = { ...racked, isRacked: true, prefix: 'rack' };
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return Object.keys(latestLocation).length !== 0 ? latestLocation : null;
|
|
28
|
+
};
|
package/lib/order/index.js
CHANGED
|
@@ -88,6 +88,7 @@ const manualSplit = require('./manualSplit');
|
|
|
88
88
|
const manualSplitByQuantity = require('./manualSplitByQuantity');
|
|
89
89
|
const applyPayment = require('./applyPayment');
|
|
90
90
|
const getBalance = require('./getBalance');
|
|
91
|
+
const getLastLocation = require('./getLastLocation');
|
|
91
92
|
|
|
92
93
|
const orderActions = (deps = {}) => {
|
|
93
94
|
const actions = {};
|
|
@@ -187,6 +188,7 @@ const orderActions = (deps = {}) => {
|
|
|
187
188
|
manualSplitByQuantity: manualSplitByQuantity(innerDeps),
|
|
188
189
|
applyPayment: applyPayment(innerDeps),
|
|
189
190
|
getOrdersBalance: getOrdersBalance(innerDeps),
|
|
191
|
+
getLastLocation: getLastLocation(innerDeps),
|
|
190
192
|
});
|
|
191
193
|
|
|
192
194
|
Object.keys(freezedActions).forEach(actionName => {
|
|
@@ -12,9 +12,12 @@ module.exports = ({ actions, modifierActions, itemActions, utils, _ }) => {
|
|
|
12
12
|
const removeModifier = ({ item, modifier, originalItem }) => {
|
|
13
13
|
const nextItem = { ...item, modifiers: [] };
|
|
14
14
|
|
|
15
|
-
nextItem.modifiers = item.modifiers.filter(
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
nextItem.modifiers = item.modifiers.filter(each => {
|
|
16
|
+
if (each.modifierId) {
|
|
17
|
+
return each.modifierId !== modifier._id && each._id !== modifier._id;
|
|
18
|
+
}
|
|
19
|
+
return each._id !== modifier._id;
|
|
20
|
+
});
|
|
18
21
|
|
|
19
22
|
if (modifierActions.isAmountOverride(modifier))
|
|
20
23
|
return {
|
|
@@ -41,10 +44,14 @@ module.exports = ({ actions, modifierActions, itemActions, utils, _ }) => {
|
|
|
41
44
|
|
|
42
45
|
let item = actions.getSelectedItem({ order, itemIndex });
|
|
43
46
|
const customer = actions.getCustomer(order);
|
|
47
|
+
|
|
44
48
|
const contains = modifierActions.contains(item.modifiers, modifier);
|
|
45
49
|
|
|
46
50
|
if (!contains) return order;
|
|
47
|
-
|
|
51
|
+
|
|
52
|
+
if (modifierActions.isRequiredAndOverride(modifier)) {
|
|
53
|
+
return order;
|
|
54
|
+
}
|
|
48
55
|
|
|
49
56
|
// Remove
|
|
50
57
|
item = removeModifier({
|
|
@@ -52,6 +59,7 @@ module.exports = ({ actions, modifierActions, itemActions, utils, _ }) => {
|
|
|
52
59
|
modifier,
|
|
53
60
|
originalItem,
|
|
54
61
|
});
|
|
62
|
+
|
|
55
63
|
item.price = itemActions.getItemPrice({
|
|
56
64
|
item,
|
|
57
65
|
itemPriceLevels: originalItem ? originalItem.priceLevels : undefined,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@darkpos/pricing",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.64",
|
|
4
4
|
"description": "Pricing calculator",
|
|
5
5
|
"author": "Dark POS",
|
|
6
6
|
"license": "ISC",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"test:createIndirectModifier": "jest --runInBand --detectOpenHandles --logHeapUsage --forceExit ./__TEST__/modifier/createIndirectModifier.test.js",
|
|
23
23
|
"test:conditionsNotMet": "jest --runInBand --detectOpenHandles --logHeapUsage --forceExit ./__TEST__/order/conditionsNotMet.test.js",
|
|
24
24
|
"test:pickEndDate": "jest --runInBand --detectOpenHandles --logHeapUsage --forceExit ./__TEST__/order/pickEndDate.test.js",
|
|
25
|
+
"test:modifier": "jest --runInBand --detectOpenHandles --logHeapUsage --forceExit ./__TEST__/modifier.test.js",
|
|
25
26
|
"lint": "eslint --quiet lib/"
|
|
26
27
|
},
|
|
27
28
|
"publishConfig": {
|
|
@@ -45,5 +46,5 @@
|
|
|
45
46
|
"supertest": "^6.2.3",
|
|
46
47
|
"supervisor": "^0.12.0"
|
|
47
48
|
},
|
|
48
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "000ac6a4b480b4a219b1411d29cbd74f86aa9716"
|
|
49
50
|
}
|