UNPKG

qapinterface

Version:

Comprehensive API utilities for Node.js applications including authentication, security, request processing, and response handling with zero external dependencies

20 lines (16 loc) 993 B
// 🔗 Tests: lib/index.js → utility/validation.js → http/error-logger.js, request/id-middleware.js require(`qtests/setup`); // initializes qtests hooks for consistent test environment const { expect } = require(`chai`); const libExports = require(`../index`); // require library index to verify re-exports describe(`library index exports`, () => { it(`should expose createValidator and validators`, () => { expect(libExports).to.have.property(`createValidator`).that.is.a(`function`); // ensures validator factory is included expect(libExports).to.have.property(`validators`).that.is.an(`object`); // ensures schema helpers are included }); it(`should expose logError`, () => { expect(libExports).to.have.property(`logError`).that.is.a(`function`); // ensures logging helper is included }); it(`should expose addRequestId`, () => { expect(libExports).to.have.property(`addRequestId`).that.is.a(`function`); // verifies request ID middleware export }); });