v4.0.18版本提交
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import {
|
||||
formatWecomReportMarkdown,
|
||||
WECOM_REPORT_EXCLUDED_ORDER_STATUSES,
|
||||
wecomReportCountedOrderWhere,
|
||||
wecomReportCutoff,
|
||||
wecomReportDueAt,
|
||||
wecomReportPeriod,
|
||||
@@ -24,6 +26,19 @@ const emptyStats = {
|
||||
redeemAmountIncrement: 40,
|
||||
};
|
||||
|
||||
describe('wecomReportCountedOrderWhere', () => {
|
||||
it('excludes pending pay, cancelled and refunding', () => {
|
||||
expect([...WECOM_REPORT_EXCLUDED_ORDER_STATUSES]).toEqual([
|
||||
'PENDING_PAY',
|
||||
'CANCELLED',
|
||||
'REFUNDING',
|
||||
]);
|
||||
expect(wecomReportCountedOrderWhere()).toEqual({
|
||||
status: { notIn: ['PENDING_PAY', 'CANCELLED', 'REFUNDING'] },
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('wecomReportPeriod', () => {
|
||||
it('daily is the previous Shanghai calendar day (closed at send-day 00:00)', () => {
|
||||
const p = wecomReportPeriod('daily', new Date('2026-09-02T20:00:00+08:00'));
|
||||
|
||||
Reference in New Issue
Block a user