fix(pricing): test fixes and post-merge tooling
Some checks are pending
CI / Lint (push) Waiting to run
CI / Schema map up to date (push) Waiting to run
CI / Forbidden patterns (9 checks) (push) Waiting to run
CI / Migrations apply (node-pg-migrate) (push) Waiting to run
CI / Unit tests (vitest) (push) Waiting to run

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Randall Stillwell 2026-09-09 11:51:08 -05:00
parent 2984185e6b
commit c6cc637f8a
5 changed files with 43 additions and 8 deletions

View file

@ -119,12 +119,14 @@ export default function CardDetailPurchaseTab({
)}
</div>
<CardDetailLocalStores
stores={nearbyStores}
loading={nearbyStoresLoading}
error={nearbyStoresError}
noHomeZip={nearbyStoresNoHomeZip}
/>
<div data-testid="card-detail-local-stores-slot">
<CardDetailLocalStores
stores={nearbyStores}
loading={nearbyStoresLoading}
error={nearbyStoresError}
noHomeZip={nearbyStoresNoHomeZip}
/>
</div>
</div>
);
}

View file

@ -19,6 +19,7 @@
"backfill-embeddings": "node --env-file=.env.local scripts/backfill-card-embeddings.js",
"migrate-neon-to-homelab": "node --env-file=.env.local scripts/migrate-neon-to-homelab.js",
"fix-pricing-pgmigration-order": "node --env-file=.env.local scripts/fix-pricing-pgmigration-order.js",
"sync-catalog-unified": "node --env-file=.env.local scripts/run-unified-catalog-sync.js",
"import-tags": "node --env-file=.env.local scripts/import-scryfall-tags.js",
"test": "vitest",
"test:run": "vitest run",

View file

@ -0,0 +1,32 @@
#!/usr/bin/env node
/**
* Run MTG + Pokémon + Lorcana bulk syncs (with pricing ingest) against POSTGRES_URL.
*
* Usage:
* node --env-file=.env.local scripts/run-unified-catalog-sync.js
*/
import { runUnifiedCatalogSync } from '../lib/card-import/sync-catalog.js';
import { closeSqlPool } from '../lib/sql.js';
async function main() {
const summary = await runUnifiedCatalogSync();
console.log(JSON.stringify(summary, null, 2));
if (summary.errors?.length) {
process.exitCode = 1;
}
}
main()
.catch((err) => {
console.error(err);
process.exitCode = 1;
})
.finally(async () => {
try {
await closeSqlPool();
} catch {
// ignore
}
});

View file

@ -66,7 +66,7 @@ describe('enrichLorcanaRowWithFolio', () => {
stats
);
expect(enriched.currentPrice).toBeNull();
expect(enriched.currentPrice ?? null).toBeNull();
expect(stats.unmatchedCount).toBe(1);
});
});

View file

@ -14,7 +14,7 @@ describe('foolio-client', () => {
});
it('uses default Foilio feed URL', () => {
expect(getFolioFeedUrl()).toBe('https://foolio.net/api/prices/feed?game=lorcana');
expect(getFolioFeedUrl()).toBe('https://foilio.net/api/prices/feed?game=lorcana');
});
it('prefers USD fields when parsing feed rows', () => {