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: '' })) })