@ayazmo/utils v0.6.8
Ayazmo Utilities
This package provides a collection of utility functions for the Ayazmo framework.
Installation
npm install @ayazmo/utils
Features
- Configuration helpers
- File system utilities
- Package management utilities
- String utilities
- Auth utilities
- Error handling
- Testing utilities
Testing Utilities
The package includes comprehensive testing utilities that make it easier to test Ayazmo applications and plugins:
- Server Builder: Create temporary Ayazmo server instances for testing
- Config Registry: Manage temporary configuration files for tests
- Host Utilities: Helper functions for working with server instances in tests
For detailed documentation on the testing utilities, see:
Example Usage
import { buildTestServer, cleanupAllTestConfigs } from '@ayazmo/utils'
describe('my plugin test', () => {
let server, fastifyInstance
before(async () => {
server = await buildTestServer('my-test', {
// Test configuration
plugins: {
'my-plugin': {
// Plugin configuration
}
}
})
fastifyInstance = await server.startAndGetInstance()
})
after(async () => {
await server.cleanup()
await cleanupAllTestConfigs()
})
it('should test my plugin', async () => {
// Your test code here
})
})
API Documentation
For full API documentation, see the JSDoc comments in the source code.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
6 months ago
7 months ago
6 months ago
8 months ago
8 months ago
7 months ago
7 months ago
9 months ago
11 months ago
11 months ago
9 months ago
9 months ago
9 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago