Files
order_site/apps/frontend/tests/mock-work-order.test.ts
T
2026-08-21 12:39:24 +08:00

15 lines
536 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import assert from 'node:assert/strict'
import test from 'node:test'
import { buildMockWorkOrderShopOptions } from '../src/utils/mock-work-order.ts'
test('本地 Mock 店铺选择仅展示启用店铺', () => {
assert.deepEqual(
buildMockWorkOrderShopOptions([
{ sellerId: 'seller-1', shopId: 'shop-1', shopName: '测试店铺', enabled: true },
{ sellerId: 'seller-2', shopId: 'shop-2', shopName: '已停用店铺', enabled: false },
]),
[{ value: 'seller-1', label: '测试店铺(seller-1' }],
)
})