gristlabs_grist-core/test/server
Florent 16ebc32611
Add tests for UsersManager (#1149)
Context

HomeDBManager lacks of direct tests, which makes hard to make rework or refactorations.
Proposed solution

Specifically here, I introduce tests which call exposed UsersManager methods directly and check their result.

Also:

    I removed updateUserName which seems to me useless (updateUser does the same work)
    Taking a look at the getUserByLogin methods, it appears that Typescirpt infers it returns a Promise<User|null> while in no case it may resolve a nullish value, therefore I have forced to return a Promise<User> and have changed the call sites to reflect the change.

Related issues

I make this change for then working on #870
2024-09-05 16:30:04 -04:00
..
lib Add tests for UsersManager (#1149) 2024-09-05 16:30:04 -04:00
utils (core) sanitizing redis errors 2023-06-06 10:51:17 +02:00
Comm.ts (core) Enabling telemetry on /api/version endpoint 2024-06-27 12:05:15 +02:00
customUtil.ts (core) Adding latest version section to the admin panel. 2024-04-29 21:59:36 +02:00
docTools.ts (core) Porting the AI evaluation script 2023-03-15 14:54:28 +01:00
fixSiteProducts.ts Add tests for UsersManager (#1149) 2024-09-05 16:30:04 -04:00
generateInitialDocSql.ts update comment 2023-01-17 15:59:09 -05:00
gristClient.ts Bump dependencies versions 2024-04-29 14:54:36 -04:00
tcpForwarder.ts (core) Add options to /status health-check endpoints to check DB and Redis liveness. 2023-10-02 14:41:04 -04:00
testUtils.ts (core) Endpoint to report on the latest version of stable grist-core image 2024-04-09 17:03:49 +02:00
wait.ts (core) Add timeouts to prevent ActiveDoc bad state during shutdown. 2023-09-26 15:32:49 -04:00