feat(edit): 定价试算开发、SKU 样式功能修改

This commit is contained in:
R524809
2026-09-29 17:50:19 +08:00
parent 84b230e69a
commit 0a303414d8
52 changed files with 4278 additions and 1393 deletions
@@ -2,7 +2,7 @@ import assert from 'node:assert/strict';
import { describe, it } from 'vitest';
import { draftPricingEnabled } from '../src/config/app-config.module.js';
describe('草稿费率开发模式边界', () => {
describe('草稿费率配置', () => {
it('开发环境默认开放,可显式关闭;测试环境需显式开启', () => {
assert.equal(draftPricingEnabled('development', 'auto'), true);
assert.equal(draftPricingEnabled('development', 'false'), false);
@@ -10,8 +10,9 @@ describe('草稿费率开发模式边界', () => {
assert.equal(draftPricingEnabled('test', 'true'), true);
});
it('生产环境即使误设开关也不能使用草稿费率', () => {
assert.equal(draftPricingEnabled('production', 'true'), false);
assert.equal(draftPricingEnabled('production', 'auto'), false);
it('生产环境默认允许草稿卡,可显式关闭', () => {
assert.equal(draftPricingEnabled('production', 'true'), true);
assert.equal(draftPricingEnabled('production', 'auto'), true);
assert.equal(draftPricingEnabled('production', 'false'), false);
});
});