feat: add one-command local development stack
This commit is contained in:
@@ -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' } }; } };
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user