Files
wekan/server/lib/tests
Lauri Ojansivu 1abb202030 Tests: a Shop invoice line is a Product, an unknown kind is refused, and every list of the line kinds names Product.
tests/billingLineKinds.test.cjs:
- Product is a kind with a label, and isInvoiceLineKind takes it;
- negative: an unknown kind ('gift', a wrong case, empty, not a string) is
  refused, the schema lists exactly the library's kinds, and the Shop's
  invoice refuses a line of a kind billing does not know;
- a shop invoice line is a product with its card, quantity and unit price,
  and the lines add up to the net with VAT taken out;
- the e-invoice writes a product as pieces (H87) at its unit price, one unit
  (C62) when there is no whole unit price, and a fee as before;
- a source scan of models, server, client, imports and config: every place
  that names the fee and the expense kinds together - as strings, label keys
  or style classes - names product too, so a new output that forgets it
  fails;
- the label is translated in every language, with no placeholder.

tests/billingAccess.test.cjs holds the schema's kinds to the library's list,
and the Shop mocha test expects its invoice line as a product of 3 at 5 EUR.

Thanks to xet7 !
2026-11-22 21:18:58 +02:00
..
2026-05-13 22:32:38 +03:00
2026-05-27 20:51:44 +03:00