15 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
Valentyne Stigloher
b25afefc49 (fmt) 2024-10-29 10:56:32 +01:00
Valentyne Stigloher
61ecf5025d (ts) migrate 2024-06-26 13:57:06 +02:00
Andrea Vos
00fd9b03d4 (security) proxy favicons to prevent potential leakage of users' IPs 2024-06-14 18:46:23 +02:00
Valentyne Stigloher
f8156d5204 (sentry) activate sentry in server scripts 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
PronounsPage
fa14ab79d9 (lint) automatically fix lints via yarn lint --fix 2024-01-11 20:36:05 +01:00
Valentyne Stigloher
e5b84d7368 (ci) add linting with ESLint
remove unused variables
2023-12-28 22:32:59 +01:00
Valentyne Stigloher
eb9ebace3a (refactor) migrate from cjs to esm so that
in the case of importing `.json` files, node does support these only via adding `with { type: 'json' }`
and then it is still experimental.
The workaround is to create a require() function which is hidden from webpack via simple-hacky string replacement.
https://nodejs.org/api/esm.html#json-modules
This means that the files are not fully compatible, as webpack supports loading of other files via `import`,
while node does only allow `.js` (experimentally `.json` and `.wasm`).
2023-12-13 23:31:45 +01:00
Andrea Vos
3edea8c214 [profile] #290 generic rel=me (links table) - random order (useful when multiple workers) 2023-01-26 00:02:38 +01:00
Andrea Vos
0b36781037 [profile] #290 generic rel=me (links table) - extra timeout handling 2023-01-25 22:54:12 +01:00
Andrea Vos
ebad259da5 [profile] #290 generic rel=me (links table) - fixes 2023-01-25 22:15:48 +01:00
Andrea Vos
bfda73dd46 [profile] #290 generic rel=me (links table) - minor fixes 2023-01-25 22:03:20 +01:00
Andrea Vos
9155b1c9fe [profile] #290 generic rel=me (links table) - minor fixes 2023-01-25 21:58:04 +01:00
Andrea Vos
8607e31c63 [profile] #290 generic rel=me (links table) 2023-01-25 21:22:40 +01:00