feat(amazon-shopping): scrape and filter amazon product results

This commit is contained in:
2026-04-15 18:48:51 -05:00
parent ef326896f4
commit 1e0e265f1e
15 changed files with 844 additions and 6 deletions
@@ -68,6 +68,14 @@ describe("parsers", () => {
});
});
it("prefers the unit price when product price appears first", () => {
assert.deepEqual(parseUnitPrice("$9.99 ($5.00$5.00/count)"), {
amount: 5,
currency: "USD",
display: "$5.00/count"
});
});
it("parses whole-dollar and one-decimal prices", () => {
assert.deepEqual(parseMoney("$20"), { amount: 20, currency: "USD", display: "$20" });
assert.deepEqual(parseMoney("$19.9"), { amount: 19.9, currency: "USD", display: "$19.9" });