import { readFileSync } from 'fs'; import path from 'path'; import { describe, expect, it } from 'vitest'; describe('库存批次删除(清零下架)', () => { it('库存页用已有 adjust 接口删除,无新接口', () => { const page = readFileSync( path.join(__dirname, '../../src/pages/inventory/InventoryManagement.tsx'), 'utf8' ); expect(page).toContain('确认删除'); expect(page).toContain('全选当前页删除'); expect(page).toContain('库存删除(批次下架)'); expect(page).toContain('availableQty: 0'); expect(page).toContain('adjustInventoryAvailableApi'); }); });