feat: add one-command local development stack

This commit is contained in:
2026-09-08 20:03:40 -04:00
parent 5916ce1ff5
commit 41efdfe041
7 changed files with 293 additions and 9 deletions
+3 -3
View File
@@ -6,7 +6,7 @@ import { getPublicListing } from '../src/services/catalog-service.js';
test('fetches a public listing detail through the API service', async () => {
const originalFetch = globalThis.fetch;
globalThis.fetch = async (url) => {
assert.equal(url, 'http://localhost:3000/api/v1/public/listings/listing-1');
assert.equal(url, '/api/v1/public/listings/listing-1');
return { ok: true, async json() { return { data: { id: 'listing-1' } }; } };
};
@@ -20,7 +20,7 @@ test('fetches a public listing detail through the API service', async () => {
test('encodes catalog search pagination in the API request', async () => {
const originalFetch = globalThis.fetch;
globalThis.fetch = async (url) => {
assert.equal(url, 'http://localhost:3000/api/v1/public/search?query=card+set&page=3&limit=20');
assert.equal(url, '/api/v1/public/search?query=card+set&page=3&limit=20');
return { ok: true, async json() { return { data: { items: [], pagination: {} } }; } };
};
@@ -35,7 +35,7 @@ test('encodes catalog search pagination in the API request', async () => {
test('fetches a public product using its stable slug URL', async () => {
const originalFetch = globalThis.fetch;
globalThis.fetch = async (url) => {
assert.equal(url, 'http://localhost:3000/api/v1/public/products/pikachu-plush');
assert.equal(url, '/api/v1/public/products/pikachu-plush');
return { ok: true, async json() { return { data: { slug: 'pikachu-plush' } }; } };
};