支持领取链接长期有效
This commit is contained in:
@@ -88,7 +88,7 @@ test('validateRuntimeConfig catches invalid numeric and url values', () => {
|
||||
},
|
||||
orders: {
|
||||
claimBaseUrl: 'not-a-url',
|
||||
tokenTtlHours: 0,
|
||||
tokenTtlHours: -1,
|
||||
},
|
||||
}),
|
||||
{
|
||||
@@ -102,6 +102,19 @@ test('validateRuntimeConfig catches invalid numeric and url values', () => {
|
||||
)
|
||||
})
|
||||
|
||||
test('validateRuntimeConfig accepts zero claim token TTL for permanent links', () => {
|
||||
const issues = validateRuntimeConfig(
|
||||
createRuntimeConfig({
|
||||
orders: {
|
||||
tokenTtlHours: 0,
|
||||
},
|
||||
}),
|
||||
{ env: { NODE_ENV: 'development' } },
|
||||
)
|
||||
|
||||
assert.deepEqual(issues, [])
|
||||
})
|
||||
|
||||
test('assertRuntimeConfigValid throws a readable validation error', () => {
|
||||
assert.throws(
|
||||
() => {
|
||||
|
||||
Reference in New Issue
Block a user