Registry / testing / daspec-junit-xml-formatter

daspec-junit-xml-formatter

JSON →
library1.0.0jsnpmunverified

A JUnit XML result formatter for the DaSpec JS Node runner, enabling integration with CI servers that consume JUnit XML reports. Version 1.0.0 is the current stable release. It is maintained as part of the DaSpec ecosystem, with low release cadence. Differentiator: dedicated to DaSpec's BDD-style specs, unlike generic JUnit reporters.

npm install daspec-junit-xml-formatter
INSTALL
IMPORT
SIG · DASPEC-JUNIT-XML-F
D
daspec-junit-xml-formatter
testingjavascriptv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
✓ require('daspec-junit-xml-formatter')
✗ const formatter = require('daspec-junit-xml-formatter').default
Package is CommonJS; no named exports; use require directly.
junit-xml-file-name
✓ daspec --junit-xml-file-name custom-report.xml
✗ daspec --junit-xml-file-name=custom-report.xml
DaSpec expects a space between flag and value, not equals sign.
formatters config
✓ "formatters": ["daspec-junit-xml-formatter"] in daspec.json
✗ "formatters": "daspec-junit-xml-formatter"
Formatters must be an array, even if only one.

Install DaSpec and the JUnit XML formatter, then run DaSpec with the formatter to generate JUnit XML reports.

npm install daspec --save-dev && npm install daspec-junit-xml-formatter --save-dev && npx daspec --specs 'specs/**/*.md' --steps 'steps/**/*.js' --formatters daspec-junit-xml-formatter --output-dir ./reports
Debug
Known issues
gotchaThe formatter requires the daspec package to be installed.
fix
Install daspec as a devDependency.
affects: *
gotchaIf you specify a custom file name with a path, the output-dir setting is ignored.
fix
Set junit-xml-file-name to just a filename without a path, or provide full path relative to cwd.
affects: >=1.0.0
gotchaThe formatter config must be an array, not a string.
fix
Use ["daspec-junit-xml-formatter"] not "daspec-junit-xml-formatter".
affects: *
gotchaCommand-line flags must use space, not equals sign.
fix
Use --junit-xml-file-name filename, not --junit-xml-file-name=filename.
affects: *
Errors
Common errors & fixes
Error: Cannot find module 'daspec'
daspec peer dependency not installed.
fix
npm install daspec --save-dev
ENOENT: no such file or directory, open '.../report.xml'
output-dir directory does not exist.
fix
Create the output directory or set a different one that exists.
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
daspecoptionalDaSpec JS Node runner is required; this package is a formatter used with it.
Agent activity
12 hits · last 30 days
node
10
Bingbot
1
Resources
daspec-junit-xml-formatter — npm install daspec-junit-xml-formatter · libregistry