mirror of
https://github.com/IT4Change/gradido.git
synced 2026-01-20 20:01:31 +00:00
Document testing options
This commit is contained in:
parent
e1392b0483
commit
2df19ab362
@ -24,3 +24,35 @@ The full `pug` documentation you'll find here:
|
||||
In case we are sending many emails in the future there is the possibility to cache the `pug` templates:
|
||||
|
||||
- [cache-pug-templates](https://github.com/ladjs/cache-pug-templates)
|
||||
|
||||
## Testing
|
||||
|
||||
To test your send emails you have different possibilities:
|
||||
|
||||
### In General
|
||||
|
||||
To send emails to yourself while developing set in `.env` the value `EMAIL_TEST_MODUS=true` and `EMAIL_TEST_RECEIVER` to your preferred email address.
|
||||
|
||||
### Unit Or Integration Tests
|
||||
|
||||
To change the behavior to show previews etc. you have the following options to be set in `sendEmailTranslated.ts` on creating the email object:
|
||||
|
||||
```js
|
||||
const email = new Email({
|
||||
…
|
||||
// send emails in development/test env:
|
||||
send: true,
|
||||
…
|
||||
// to open send emails in the browser
|
||||
preview: true,
|
||||
// or
|
||||
// to open send emails in a specific the browser
|
||||
preview: {
|
||||
open: {
|
||||
app: 'firefox',
|
||||
wait: false,
|
||||
},
|
||||
},
|
||||
…
|
||||
})
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user