18 lines
815 B
TypeScript
18 lines
815 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'), false);
|
|
assert.equal(draftPricingEnabled('production', 'auto'), false);
|
|
});
|
|
});
|