Skip to content

Commit

Permalink
doc(README): added more example usage
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Apr 11, 2024
1 parent c5677e7 commit dab946b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .release
Submodule .release updated 1 files
+7 −6 start.sh
2 changes: 1 addition & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

This handcrafted artisinal software is brought to you by:

| <img height="80" src="https://avatars.githubusercontent.com/u/261635?v=4"><br><a href="https://github.com/msimerson">msimerson</a> (<a href="https://github.com/haraka/haraka-plugin-access/commits?author=msimerson">60</a>)| <img height="80" src="https://avatars.githubusercontent.com/u/1432035?v=4"><br><a href="https://github.com/kcberg">kcberg</a> (<a href="https://github.com/haraka/haraka-plugin-access/commits?author=kcberg">1</a>)| <img height="80" src="https://avatars.githubusercontent.com/u/662371?v=4"><br><a href="https://github.com/baudehlo">baudehlo</a> (<a href="https://github.com/haraka/haraka-plugin-access/commits?author=baudehlo">1</a>)| <img height="80" src="https://avatars.githubusercontent.com/u/550490?v=4"><br><a href="https://github.com/smfreegard">smfreegard</a> (<a href="https://github.com/haraka/haraka-plugin-access/commits?author=smfreegard">1</a>)| <img height="80" src="https://avatars.githubusercontent.com/u/203240?v=4"><br><a href="https://github.com/lnedry">lnedry</a> (<a href="https://github.com/haraka/haraka-plugin-access/commits?author=lnedry">1</a>)|
| <img height="80" src="https://avatars.githubusercontent.com/u/261635?v=4"><br><a href="https://github.com/msimerson">msimerson</a> (<a href="https://github.com/haraka/haraka-plugin-access/commits?author=msimerson">61</a>)| <img height="80" src="https://avatars.githubusercontent.com/u/1432035?v=4"><br><a href="https://github.com/kcberg">kcberg</a> (<a href="https://github.com/haraka/haraka-plugin-access/commits?author=kcberg">1</a>)| <img height="80" src="https://avatars.githubusercontent.com/u/662371?v=4"><br><a href="https://github.com/baudehlo">baudehlo</a> (<a href="https://github.com/haraka/haraka-plugin-access/commits?author=baudehlo">1</a>)| <img height="80" src="https://avatars.githubusercontent.com/u/550490?v=4"><br><a href="https://github.com/smfreegard">smfreegard</a> (<a href="https://github.com/haraka/haraka-plugin-access/commits?author=smfreegard">1</a>)| <img height="80" src="https://avatars.githubusercontent.com/u/203240?v=4"><br><a href="https://github.com/lnedry">lnedry</a> (<a href="https://github.com/haraka/haraka-plugin-access/commits?author=lnedry">1</a>)|
| :---: | :---: | :---: | :---: | :---: |

<sub>this file is maintained by [.release](https://github.com/msimerson/.release)</sub>
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,30 @@

Fixtures for testing Haraka and plugins

# Usage
## Usage

`const fixtures = require('haraka-test-fixtures');`
```js
const fixtures = require('haraka-test-fixtures')
````

# Exports the following fixture types:
### A common pattern

```js
beforeEach(() => {
this.plugin = new fixtures.plugin('pluginName');
this.connection = fixtures.connection.createConnection()
this.connection.init_transaction()
})
describe('pluginName', () => {
it('registers', () => {
this.plugin.register();
})
})
```

## Exports the following fixture types:

- connection
- line_socket
Expand Down

0 comments on commit dab946b

Please sign in to comment.