This commit is contained in:
2026-10-08 17:07:57 +08:00
parent 16d2d9111a
commit c1ddb658bd
111 changed files with 2914 additions and 941 deletions
@@ -0,0 +1,15 @@
import assert from 'node:assert/strict'
import test from 'node:test'
import { pickerFixtureSuffix } from './phase4-overseas-pda.mjs'
test('长场景尾部相同时PDA账号仍保留完整运行标识的区别', () => {
const first = { marker: 'ADMIN-API-20261005134027677-COMPLETED-F40-PDA' }
const second = { marker: 'ADMIN-API-20261005170914227-COMPLETED-F40-PDA' }
const oldSuffix = value => value.marker.replace(/[^A-Za-z0-9]/g, '').slice(-16)
assert.equal(oldSuffix(first), oldSuffix(second))
assert.notEqual(pickerFixtureSuffix(first), pickerFixtureSuffix(second))
assert.equal(pickerFixtureSuffix(first), pickerFixtureSuffix({ ...first }))
assert.match(pickerFixtureSuffix(first), /^[0-9A-F]{32}$/)
assert.notEqual(pickerFixtureSuffix(first), pickerFixtureSuffix({ ...first, pdaContainerSuffix: 'B' }))
assert.throws(() => pickerFixtureSuffix({ marker: '' }))
})