Skip to content

Commit

Permalink
feat(db): mention fake driver
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed Jan 9, 2024
1 parent 3b13dc5 commit e2873ec
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
21 changes: 16 additions & 5 deletions docs/database/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,23 @@ is already present in your application's `Path.config('database.ts')`
configuration file, so be sure to review this file to become
familiar with its contents:

| Driver name | Website | Built with |
| Driver name | Website | Built with |
|:------------|:--------------------------------:|-----------------------------------------------------:|
| `mongo` | https://www.mongodb.com/ | [mongoose](https://www.npmjs.com/package/mongoose) |
| `mysql` | https://www.mysql.com/ | [knex](https://www.npmjs.com/package/knex) |
| `sqlite` | https://www.sqlite.org/ | [knex](https://www.npmjs.com/package/knex) |
| `postgres` | https://www.postgresql.org/ | [knex](https://www.npmjs.com/package/knex) |
| `mongo` | https://www.mongodb.com/ | [mongoose](https://www.npmjs.com/package/mongoose) |
| `mysql` | https://www.mysql.com/ | [knex](https://www.npmjs.com/package/knex) |
| `sqlite` | https://www.sqlite.org/ | [knex](https://www.npmjs.com/package/knex) |
| `postgres` | https://www.postgresql.org/ | [knex](https://www.npmjs.com/package/knex) |

:::note

Athenna has another driver called `fake` that is very helpful when running tests.
The `fake` driver got the same signature of all other drivers, but it returns
empty objects and arrays in executors methods like `find()`, which is perfect to use
within the [`Mock`](/docs/testing/mocking) class. For more information
about the `FakeDriver`, take a look at the
[mocking database documentation section.](/docs/testing/mocking#mocking-database)

:::

### Overview of some environment variables

Expand Down
5 changes: 5 additions & 0 deletions docs/testing/mocking.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -994,3 +994,8 @@ export default class GreetTest {
}
}
```


## Mocking database

Coming soon...

0 comments on commit e2873ec

Please sign in to comment.