Skip to content

xJet Logging Utilities

xJet provides a suite of logging functions designed for use during test runtime. These functions let you send logs, errors, warnings, or debug output directly to the test runner or reporting layer, making it easy to trace, debug, and communicate test state from inside any test or helper.

API

The following logging methods are available:

  • xJet.log(...args)
  • xJet.info(...args)
  • xJet.warn(...args)
  • xJet.error(...args)
  • xJet.debug(...args)

All functions accept any number of arguments of any type (just like console.log) and forward those to the runner/logger.

ts
xJet.debug('User:', userId, 'Request:', requestDetails);

Output

Error:

Error

Debug:

Debug

Summary Table

FunctionPurposeExample Usage
xJet.logGeneral-purpose loggingxJet.log('Test message', obj)
xJet.infoInformational eventsxJet.info('Current state:', state)
xJet.warnPotential problems or warningsxJet.warn('Threshold exceeded:', value)
xJet.errorErrors or failed operationsxJet.error('Exception:', error)
xJet.debugDetailed debug informationxJet.debug('Params:', params)

Released under the Mozilla Public License 2.0