> For the complete documentation index, see [llms.txt](https://docs.newbot.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.newbot.io/unit-tests/test-the-actions.md).

# Test the actions

Here is an action

```typescript
@Action('menu') 
start() {
    > Menu :action
}
```

The test :

```javascript
import assert from 'assert'
import { ConverseTesting } from 'newbot/testing'
import mainSkill from './main'

describe('My own test', () => {
    let converse, userConverse

    beforeEach(() => {
        converse = new ConverseTesting(mainSkill)
        userConverse = converse.createUser()
    })

    test('Test Action', () => {
        return userConverse
            .action('menu', 'food', testing => {
                assert.equal(testing.output(0), 'Menu food')
            })
            .end()
    })
})
```

Use the `action()` method to execute an action in the script

> We can ignore the second parameter if we do not use the magic variable `:action`:

```javascript
userConverse.action('menu', testing => { })
```
