feat(06-01): migrate categories from emoji to Lucide icon field
- Rename emoji column to icon in schema, Zod schemas, and all services - Add Drizzle migration with emoji-to-icon data conversion - Update test helper, seed, and all test files for icon field - All 87 tests pass with new icon-based schema Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,7 @@ describe("Totals Service", () => {
|
||||
|
||||
describe("getCategoryTotals", () => {
|
||||
it("returns weight sum, cost sum, item count per category", () => {
|
||||
const shelter = createCategory(db, { name: "Shelter", emoji: "\u{26FA}" });
|
||||
const shelter = createCategory(db, { name: "Shelter", icon: "tent" });
|
||||
createItem(db, {
|
||||
name: "Tent",
|
||||
weightGrams: 1200,
|
||||
@@ -39,7 +39,7 @@ describe("Totals Service", () => {
|
||||
});
|
||||
|
||||
it("excludes empty categories (no items)", () => {
|
||||
createCategory(db, { name: "Shelter", emoji: "\u{26FA}" });
|
||||
createCategory(db, { name: "Shelter", icon: "tent" });
|
||||
// No items added
|
||||
const totals = getCategoryTotals(db);
|
||||
expect(totals).toHaveLength(0);
|
||||
|
||||
Reference in New Issue
Block a user