- T1 资金/库存/报价/自采 P1(BIZ-1/2/3/4/10/13/14) - T2 主系统反向事件墓碑/改派/孤儿处理(BIZ-6/8/9) - T3 选分公司 ticket、trust proxy、角色权限收口(SEC-2/3/4) - T4 缺列/RLS/tenant 名单/FK/迁移执行器(DATA-1..8) - T5 401 登出/分页/映射口径/blob/ZIP 中文名(FE-1..4/BIZ-15) - T6 测试脚本目标守卫/config fail-fast/容器配置(OPS-2..8) - T7 前后端测试与 lint 门禁清零 - T8 应付卡片按关联订单日(口径 A) - T9 存储对象全链路归属校验、敏感列禁写、审计 target_id 超长修复
27 lines
1.0 KiB
TypeScript
27 lines
1.0 KiB
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import { readFileSync } from 'node:fs';
|
|
import path from 'path';
|
|
import { weighInspectionNearTodaySql } from '../src/services/inspectionQueryService';
|
|
|
|
describe('称上待验今天±1天', () => {
|
|
it('SQL 含上海日历 ±1 与配送日回退', () => {
|
|
const sql = weighInspectionNearTodaySql('i');
|
|
expect(sql).toContain("TIME ZONE 'Asia/Shanghai'");
|
|
expect(sql).toContain('delivery_date');
|
|
expect(sql).toContain('::date - 1');
|
|
expect(sql).toContain('::date + 1');
|
|
});
|
|
|
|
it('INSPECTION_PENDING_WHERE 已挂近今日窗', () => {
|
|
const src = readFileSync(
|
|
path.join(__dirname, '../src/services/weighStationService.ts'),
|
|
'utf8'
|
|
);
|
|
expect(src).toContain('weighInspectionNearTodaySql');
|
|
expect(src).toContain('INSPECTION_PENDING_WHERE');
|
|
});
|
|
|
|
// 原「设计文档存在」断言已移除:`20260910-weigh-inspection-near-today.md` 不在本仓库
|
|
// (git 历史亦无)。「今天±1」SQL 契约由上方用例直接钉住(T7 AC-T7.1.3)。
|
|
});
|