19 lines
868 B
TypeScript
19 lines
868 B
TypeScript
import assert from 'node:assert/strict';
|
|
import { describe, it } from 'vitest';
|
|
import { draftPricingEnabled } from '../src/config/app-config.module.js';
|
|
|
|
describe('草稿费率配置', () => {
|
|
it('开发环境默认开放,可显式关闭;测试环境需显式开启', () => {
|
|
assert.equal(draftPricingEnabled('development', 'auto'), true);
|
|
assert.equal(draftPricingEnabled('development', 'false'), false);
|
|
assert.equal(draftPricingEnabled('test', 'auto'), false);
|
|
assert.equal(draftPricingEnabled('test', 'true'), true);
|
|
});
|
|
|
|
it('生产环境默认允许草稿卡,可显式关闭', () => {
|
|
assert.equal(draftPricingEnabled('production', 'true'), true);
|
|
assert.equal(draftPricingEnabled('production', 'auto'), true);
|
|
assert.equal(draftPricingEnabled('production', 'false'), false);
|
|
});
|
|
});
|