Replies: 1 comment 4 replies
-
Hey, can you share your architecture? I am looking for something similar. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm making a REST backend using Adonis v5 and was writing unit tests for my controller & service methods when I ran into a little hiccup.
My Auth service exposes login method, which takes inputs & auth object (passed from Controller, which in turn receives it from the HttpContext).
Here's the declaration:
public async login(inputs: any, auth: AuthContract)
Where AuthContract is import using:
import { AuthContract } from '@ioc:Adonis/Addons/Auth';
I was wondering if there was a way to get the auth object or instantiate it in my test so that I can pass it to my Service method while calling it?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions