-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
|
LGTM for now |
Henriquelay
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meu pau fi, difícil pra crl automar teste com DB kkkk o resto tá tudo pronto ja e tô aqui nessa luta
|
pera vc tava falando daqui |
Os unitários estão bala e exemplos estão já pushados o foda tá sendo testar com DB |
| // FIXME not actually throwing WTF but when env is actually no set on server it throws. I don't think it have anything to do with asynchronous tests and such, since they are on different threads. | ||
| it.skip('fails when `JWT_SECRET` env is not set', () => { | ||
| const request = { | ||
| // Is there a way to modularize this better? Doesn't feel DRY enough. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modularize WHAT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The middleware parameters. Request, Reponse and next. I think I did something of the sorts on another project, but I don't have access to the source anymore
| import ensureAuthenticated from './ensureAuthenticated'; | ||
|
|
||
| describe('ensures', () => { | ||
| // FIXME not actually throwing WTF but when env is actually no set on server it throws. I don't think it have anything to do with asynchronous tests and such, since they are on different threads. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it won't throw unless the JWT token is missing. Invalid tokens, etc are caught by our try-catch; only missing tokens throw errors (Error).
Is authConfig.jwt.secret set and loaded correctly? I don't think it is related but as a last resort...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not the JWT token, the JWT_SECRET env
|
Think it's already enough to start solving for #33 ? |
|
I don't remember where this is standing and I haven't tested it myself, but if it is working for unit tests then I'd say yes |
|
Check status in issue main message. Improvements on DB testing could be made. |
|
Fine by me, we can improve it later |
(WIP) Jest is detecting open handles on Redis' bee
9305d0e to
d40663a
Compare
Signed-off-by: Henriquelay <[email protected]>
…certinho valeu boa noite Signed-off-by: Henriquelay <[email protected]>
|
MIGATIONS 🔥 |
|
Make India Great Again |
…r favo :plead::plead: não precisa olhar como é feito confia em mim por favor nunca te pedi nada mim der esse dois ponto tô precisando muito obrigado Signed-off-by: Henriquelay <[email protected]>
Setups Jest to work properly with Typescript.
TODO: Testing setup using database and endpoints that modify the database