feat: add exact signed money parsing and formatting
This commit is contained in:
@@ -123,6 +123,14 @@ describe("central ESI client", () => {
|
||||
});
|
||||
|
||||
describe("ESI market estimates", () => {
|
||||
test("keeps the inherited non-negative market-price policy", async () => {
|
||||
const queued = queueFetch([
|
||||
response([{ type_id: 34, average_price: -1 }], { ETag: '"negative"', "Cache-Control": "max-age=60" }),
|
||||
]);
|
||||
const client = new EsiClient({ userAgent: "test", fetch: queued.fetch, now: () => 1234 });
|
||||
await expect(new EsiMarketEstimates(client).estimates([34])).rejects.toMatchObject({ code: "invalid_price" });
|
||||
});
|
||||
|
||||
test("uses average prices only and returns cents with retrieval provenance", async () => {
|
||||
const queued = queueFetch([
|
||||
response([
|
||||
|
||||
Reference in New Issue
Block a user