13 Commits

Author SHA1 Message Date
Adaline Simonian
23a3862ca0
test: introduce snapshot-based smoke tests
- Adds a new test suite with Docker-based smoke tests for all locales.
  Can be run using the ./smoketest.sh script.
- Replaces all calls to Math.random() with a new helper that returns 0.5
  in snapshot testing mode, ensuring deterministic snapshots.
- Similarly replaces all calls to new Date() and Date.now() with new
  helpers that return a fixed date in snapshot testing mode.
- Replaces checks against NODE_ENV with APP_ENV, to ensure that the
  bundles can be built with Nuxt for testing without losing code that
  would otherwise be stripped out by production optimizations.
- Adds a database init script that can be used to initialize the
  database with a single admin user and a long-lived JWT token for use
  in automation tests.
- Adds a JWT decoding/encoding CLI tool for debugging JWTs.

Note: Snapshots are not checked in, and must be generated manually. See
test/__snapshots__/.gitignore for more information.
2025-02-02 23:11:19 -08:00
Andrea Vos
e20ad4bac8 (adit) cleanup audit log 2025-01-03 13:33:47 +01:00
Andrea Vos
a3c2dbb0a7 oh linter… 2025-01-02 13:06:08 +01:00
Andrea Vos
23fc8e3bd9 CR improvements 2025-01-02 12:59:19 +01:00
Andrea Vos
c44b7fed3e typechecks 2024-12-31 19:59:56 +01:00
Andrea Vos
9bc8230d82 typechecks 2024-12-31 19:53:58 +01:00
Andrea Vos
1055e3b5bd split audit log into a separate database and compress payload 2024-12-31 11:17:37 +01:00
Valentyne Stigloher
b25afefc49 (fmt) 2024-10-29 10:56:32 +01:00
Andrea Vos
bcfa7307d4 make audit log bidirectional (eg. mod banning a user should show up in both mod's and user's log) 2024-09-22 15:54:05 +00:00
Valentyne Stigloher
a99199f322 (nuxt) integrate express as server handler while preventing Nuxt from scanning server directory 2024-09-11 21:29:35 +02:00
Valentyne Stigloher
39127c5943 (ts) convert server/routes 2024-06-26 13:59:53 +02:00
Valentyne Stigloher
f69aec7998 (sentry) replace some console.error with Sentry.captureException 2024-03-05 18:19:34 +01:00
Valentyne Stigloher
7ce1bb0e83 (ts) convert a lot to TypeScript
Co-authored-by: Sky <msurvival65@gmail.com>
Co-authored-by: tecc <tecc@tecc.me>
2024-02-23 17:48:16 +01:00