0.6.8 • Published 10 months ago

@ayazmo/utils v0.6.8

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

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.

0.6.7

10 months ago

0.6.6

11 months ago

0.6.8

10 months ago

0.6.3

12 months ago

0.6.2

12 months ago

0.6.5

11 months ago

0.6.4

12 months ago

0.5.0

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.6.1

1 year ago

0.6.0

1 year ago

0.5.1

1 year ago

0.3.0

1 year ago

0.2.7

1 year ago

0.2.6

1 year ago

0.2.5

1 year ago

0.1.31

1 year ago

0.1.32

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.4

1 year ago

0.1.30

2 years ago

0.1.21

2 years ago

0.1.22

2 years ago

0.1.23

2 years ago

0.1.24

2 years ago

0.1.25

2 years ago

0.1.26

2 years ago

0.1.27

2 years ago

0.1.28

2 years ago

0.1.29

2 years ago

0.1.20

2 years ago

0.1.18

2 years ago

0.1.13

2 years ago

0.1.10

2 years ago

0.1.11

2 years ago

0.1.8

2 years ago

0.1.9

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.4

2 years ago

0.1.2

2 years ago