How do I use Request and Response while testing Adonis provider

I have this provider I want to write test for but request and response are not available from within the test file. I have tried importing them like:

const Response = use('Adonis/Src/Response')
// After import ioc from fold
const Response = ioc.use('Adonis/Src/Response')

Can u share more context on what exactly you are trying to test

const test = require('japa')
const { ioc } = require('@adonisjs/fold')

const ApolloServer = require('../src/ApolloServer')
const ApolloServerProvider = require('../providers/ApolloServerProvider')

test('throws error if called without schema', (assert) => {
    const provider = new ApolloServerProvider(ioc)
    provider.register()
    const apolloServer = ioc.use('ApolloServer')

    assert.throws(() => apolloServer.graphql(undefined), 'Apollo Server requires options.')
})

Though this is working as expected for what I’m testing, but I’m wondering how I could get request and response because the graphql() accepts 3 arguments (options, request and response).

You have to build actual HTTP request/response cycle to test this. Since it is not only about getting the request and response classes, it’s also about getting the underlying data associated with them.

Yeah, that was what thought too.