Skip to content

Commit

Permalink
Merge pull request #128 from AthennaIO/develop
Browse files Browse the repository at this point in the history
feat(docs): improve docs
  • Loading branch information
jlenon7 committed Oct 15, 2023
2 parents 8d58e10 + 8b28afe commit a8c874f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions docs/architecture-concepts/application-lifecycle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ bellow:
it depends on service providers to register your controllers, services,
middlewares, routes, etc.

- The `cli` application and Artisan commands does not fire the foundation
because commands do not depends on registering providers, loading
- The `CLI` application and Artisan commands does not fire the foundation
because commands do not depend on registering providers, loading
environment variables and configuration files, for example. But, if your
command got the `loadApp` equals true in `.athennarc.json`, the foundation
will be fired before executing your command.
command got the `loadApp` setting equals to `true` in `.athennarc.json`,
the foundation will be fired before executing your command.

:::

Expand Down
6 changes: 3 additions & 3 deletions docs/testing/mocking.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ export default class AppControllerTest extends BaseRestTest {
}

@Test()
public async shouldBeAbleToMock({ request }: Context) {
const mock = Mock.when(this.appService, 'findOne').return({ fake: true })
public async shouldBeAbleToMock({ assert, request }: Context) {
Mock.when(this.appService, 'findOne').return({ fake: true })

const response = await request.get('/api/v1')

response.assertStatusCode(200)
response.assertBodyContains({ fake: true })
assert.called(mock)
assert.calledOnce(this.appService.findOne)
}
}
```
Expand Down

0 comments on commit a8c874f

Please sign in to comment.