createUser in src/core/users.ts refuses invalid_username when isSafeName rejects the name, and no test names it.
Done:
[ ] A new test signs up through the page and the API with: .., a/b, <b>, a name with a NUL, a 200-character name, and a reserved word such as settings or api. Each is refused with invalid_username.
[ ] No user row exists after each refusal.
[ ] A plain alice-2 succeeds.
Files: test/username-refusals.test.ts
If the test finds the behaviour wrong, fix the module it names in the same pull and say so. If the check fails in a test this pull does not touch, name it in the pull rather than widening the change.
Before pushing: bun x tsc --noEmit and the new test.
createUserinsrc/core/users.tsrefusesinvalid_usernamewhenisSafeNamerejects the name, and no test names it.Done:
..,a/b,<b>, a name with a NUL, a 200-character name, and a reserved word such assettingsorapi. Each is refused withinvalid_username.alice-2succeeds.Files: test/username-refusals.test.ts
If the test finds the behaviour wrong, fix the module it names in the same pull and say so. If the check fails in a test this pull does not touch, name it in the pull rather than widening the change.
Before pushing:
bun x tsc --noEmitand the new test.