@simplens/mock
v1.0.2
Published
Mock provider plugin for SimpleNS for testing
Downloads
347
Readme
@simplens/mock
A mock provider plugin for SimpleNS designed for testing and development purposes.
Installation
npm install @simplens/mockUsage
Configuration
Add the mock provider to your simplens.config.yaml:
providers:
- name: mock
package: '@simplens/mock'
options:
rateLimit:
maxTokens: 100
refillRate: 10Notification Schema
The mock provider accepts notifications with the following structure:
{
channel: 'mock',
recipient: {
user_id: string
},
content: {
message: string
}
}Configuration Options
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| rateLimit.maxTokens | number | 100 | Maximum number of tokens in the rate limit bucket |
| rateLimit.refillRate | number | 10 | Number of tokens refilled per second |
Development
Build
npm run buildTest
npm testWatch Mode
npm run test:watchLicense
MIT
Author
SimpleNS Team
