orderApprovalFormat.test.cjs 533 Bytes
const assert = require('assert')
const { getFormattedFieldValue } = require('../src/views/orderApproval/orderApprovalFormat')

assert.strictEqual(getFormattedFieldValue(0, 'lowPriceFlag'), '-')
assert.strictEqual(getFormattedFieldValue(1, 'lowPriceFlag'), '低价订单')
assert.strictEqual(getFormattedFieldValue(undefined, 'lowPriceFlag'), '-')
assert.strictEqual(getFormattedFieldValue(null, 'lowPriceFlag'), '-')
assert.strictEqual(getFormattedFieldValue(2, 'lowPriceFlag'), '-')

console.log('orderApprovalFormat tests passed')