How dareid/chakram works
Chakram is a promise-based BDD library for end-to-end testing of JSON REST APIs. A test author issues HTTP requests, passes their promises to expectations, and waits for the resulting assertions; request methods produce response objects that carry the body, headers, cookies, URL, and timing data used by matchers. The map includes the documented HTTP assertion families and plugin/debug capabilities. Several assertion implementations were not excerpted, so their individual internals and connections are not inferred.
Main entry points: index.js Matcher registry · chakram.js Chakram API · methods.js Request execution · plugins.js Plugin registration
Components 22
Public API
- Chakram API
lib/chakram.js - Promise expectations
lib/chakram.js - Promise coordination
lib/chakram.js
HTTP Requests
- HTTP verb methods
lib/methods.js - Request execution
lib/methods.js - Response object
lib/methods.js
Response Assertions
- Status assertion
lib/assertions/statuscode.js - Header assertion
lib/assertions/header.js - Cookie assertion
lib/assertions/cookie.js - JSON assertion
lib/assertions/json.js - Schema assertion
lib/assertions/schema.js - Compression assertion
lib/assertions/compression.js - JSON comprise
lib/assertions/comprise.js - Response-time assertion
lib/assertions/responsetime.js - Array length assertion
lib/assertions/arrayLength.js - Array inclusion assertion
lib/assertions/arrayIncluding.js - JSON path lookup
lib/utils/objectPath.js - Matcher registry
lib/assertions/index.js
Plugins and Debug
- Plugin registration
lib/plugins.js - Request debugging
lib/debug.js
Other components
- Test author
- REST API
Connections 27
- Test author → Chakram API: uses
README.md - Chakram API → HTTP verb methods: exports methods
lib/chakram.js - Chakram API → Plugin registration: exports plugins
lib/chakram.js - Chakram API → Request debugging: exports debugging
lib/chakram.js - Test author → HTTP verb methods: issues requests
README.md - HTTP verb methods → Request execution: dispatches verbs
lib/methods.js - Request execution → REST API: sends HTTP
lib/methods.js - Request execution → Response object: resolves response
lib/methods.js - Test author → Promise expectations: asserts response
README.md - Promise expectations → Plugin registration: initializes Chai
lib/chakram.js - Promise expectations → Promise coordination: records promises
lib/chakram.js - Promise coordination → Test author: provides wait
README.md - Plugin registration → Matcher registry: registers matchers
lib/plugins.js - Matcher registry → Status assertion: loads matcher
lib/assertions/index.js - Matcher registry → Header assertion: loads matcher
lib/assertions/index.js - Matcher registry → Cookie assertion: loads matcher
lib/assertions/index.js - Matcher registry → Schema assertion: loads matcher
lib/assertions/index.js - Matcher registry → JSON assertion: loads matcher
lib/assertions/index.js - Matcher registry → Compression assertion: loads matcher
lib/assertions/index.js - Matcher registry → JSON comprise: loads matcher
lib/assertions/index.js - Matcher registry → Response-time assertion: loads matcher
lib/assertions/index.js - Matcher registry → Array length assertion: loads matcher
lib/assertions/index.js - Matcher registry → Array inclusion assertion: loads matcher
lib/assertions/index.js - Array inclusion assertion → JSON path lookup: looks up path
lib/assertions/arrayIncluding.js - Array length assertion → JSON path lookup: looks up path
lib/assertions/arrayLength.js - JSON assertion → JSON path lookup: looks up path
lib/assertions/json.js - Request debugging → REST API: traces traffic
lib/debug.js