---
description: An inject function to run integration tests
---

# inject

## Arguments

| Name  | Type          | Description                                                                                              |
| ----- | ------------- | -------------------------------------------------------------------------------------------------------- |
| opts  | Object        | Options to be given to light-my-request [see list here](https://github.com/fastify/light-my-request#api) |
| route | Map\|Function | The route/handler to run tests against                                                                   |

## Returns

| Type   | Description                             |
| ------ | --------------------------------------- |
| Object | The Light My Request object is returned |

## Usage

```javascript
const { debug, router, methods, response } = require('octoris')

function handler () {
  return response.send(200, 'Hello')
}

debug.inject({
  url: 'localhost:3000',
  method: 'GET'
}, router.route(['/'], [methods.GET(handler)]))

```
