补齐证书齐备、证件折算、移动用证和合同绑定,并带上报销批量发放、付款备注以及个人开发流程升级,便于继续讨论已安排计划的调整规则。 Co-authored-by: Cursor <cursoragent@cursor.com>
20 lines
997 B
TypeScript
20 lines
997 B
TypeScript
import assert from 'node:assert/strict'
|
|
import test from 'node:test'
|
|
import { toxicArrangeBlockMessage } from '../src/utils/pl-quota-cert-waiver'
|
|
|
|
const unbound = '合同HT-1尚未绑定购买证和运输证,请先到合同中绑定后再安排运输'
|
|
|
|
test('marked plans ignore the local certificate gap and keep source errors', () => {
|
|
assert.equal(toxicArrangeBlockMessage({ quotaCertWaived: true, arrangeBlockMessage: '' }, unbound), '')
|
|
assert.equal(
|
|
toxicArrangeBlockMessage({ quotaCertWaived: true, arrangeBlockMessage: '这一段还没有关联合同' }, unbound),
|
|
'这一段还没有关联合同'
|
|
)
|
|
})
|
|
|
|
test('unmarked plans still block on the server message or the local certificate gap', () => {
|
|
assert.equal(toxicArrangeBlockMessage({ arrangeBlockMessage: '证件余量不足' }, unbound), '证件余量不足')
|
|
assert.equal(toxicArrangeBlockMessage({ arrangeBlockMessage: '' }, unbound), unbound)
|
|
assert.equal(toxicArrangeBlockMessage(null, unbound), unbound)
|
|
})
|