gristlabs_grist-core/test/gen-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
ApiServer.ts Add tests for UsersManager (#1149) 2024-09-05 16:30:04 -04:00
ApiServerAccess.ts Add tests for UsersManager (#1149) 2024-09-05 16:30:04 -04:00
ApiServerBenchmark.ts (core) move apiserver tests to core, disentangling notifier+billing parts 2023-12-26 08:43:12 -05:00
ApiServerBugs.ts Add tests for UsersManager (#1149) 2024-09-05 16:30:04 -04:00
ApiSession.ts (core) Customizable stripe plans. 2024-05-19 09:09:19 +02:00
apiUtils.ts Move HomeDBManager to gen-server/lib/homedb (#1076) 2024-07-05 16:02:39 +02:00
AuthCaching.ts Move HomeDBManager to gen-server/lib/homedb (#1076) 2024-07-05 16:02:39 +02:00
migrations.ts Activations: add an enabled_at column 2024-08-06 15:06:36 -04:00
seed.ts Add tests for UsersManager (#1149) 2024-09-05 16:30:04 -04:00
testUtils.ts Add tests for UsersManager (#1149) 2024-09-05 16:30:04 -04:00
UpdateChecks.ts (core) Enabling telemetry on /api/version endpoint 2024-06-27 12:05:15 +02:00