fix(procurement): read MySQL fulfillment timestamps with JDBC types
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import test from 'node:test'
|
||||
import assert from 'node:assert/strict'
|
||||
import { execute, options } from './procurement-sample-test-env.mjs'
|
||||
import { execute, options, accountForCustomer } from './procurement-sample-test-env.mjs'
|
||||
|
||||
test('default preview needs no credentials and performs no execution', async () => {
|
||||
const result = await execute([], [])
|
||||
@@ -15,3 +15,10 @@ test('execution rejects an absent or different environment file before login', a
|
||||
await assert.rejects(execute(args, []), /TEST 环境文件/)
|
||||
await assert.rejects(execute(args, ['--env-file=C:\\private\\production.env']), /TEST 环境文件/)
|
||||
})
|
||||
|
||||
test('Finance uses a data array and matches the exact customer without numeric coercion', () => {
|
||||
const row = { customerId:'9007199254740993', accountVersion:0, actualBalance:'0.00' }
|
||||
assert.equal(accountForCustomer([{ customerId:'9007199254740992' }, row], '9007199254740993'), row)
|
||||
assert.throws(() => accountForCustomer({ records:[row] }, row.customerId), /正式数组/)
|
||||
assert.throws(() => accountForCustomer([], row.customerId), /本轮独立客户/)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user