{"library":"qunit-parser","title":"QUnit Test Output Parser","description":"The `qunit-parser` package is a JavaScript utility designed to parse the raw text output from the QUnit testing framework, aiming to provide a structured, programmatic representation of test results. Currently at version 0.2.0, this package was last published approximately seven years ago, indicating it is an abandoned project with no ongoing maintenance or updates. It is not affiliated with the core QUnit testing framework itself but rather serves a niche function for processing CLI or log output. Due to its age, users should be aware of potential incompatibilities with newer QUnit versions or modern JavaScript environments. Its release cadence is non-existent, and its primary utility lies in attempting to extract data from QUnit's console output where other programmatic interfaces might not be feasible.","language":"javascript","status":"abandoned","last_verified":"Sun Apr 19","install":{"commands":["npm install qunit-parser"],"cli":null},"imports":["const { parse } = require('qunit-parser');"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const { parse } = require('qunit-parser');\n\n// Simulate a simplified QUnit console output string\nconst qunitOutput = `\nRunning 2 tests\nok 1 - My Module > Test 1: should pass\n# pass 1\n# fail 0\nnot ok 2 - My Module > Test 2: should fail an assertion\n# test timed out\n# {\n#   \"name\": \"My Module > Test 2: should fail an assertion\",\n#   \"passed\": 0,\n#   \"failed\": 1,\n#   \"total\": 1,\n#   \"duration\": 50,\n#   \"errors\": [\"Assertion failed: expected true, got false\"],\n#   \"seed\": \"12345\"\n# }\n1..2\n# tests 2\n# pass 1\n# fail 1\n`;\n\ntry {\n    const parsedResults = parse(qunitOutput);\n    console.log('Parsed QUnit Results:');\n    console.log(JSON.stringify(parsedResults, null, 2));\n    // Example of accessing parsed data\n    console.log(`Total tests: ${parsedResults.total}`);\n    console.log(`Passed tests: ${parsedResults.passed}`);\n    console.log(`Failed tests: ${parsedResults.failed}`);\n    if (parsedResults.failures && parsedResults.failures.length > 0) {\n        console.log('Details of first failure:', parsedResults.failures[0]);\n    }\n} catch (error) {\n    console.error('Error parsing QUnit output:', error.message);\n}","lang":"javascript","description":"Demonstrates how to import the `qunit-parser` and use it to process a simulated QUnit console output string, showing the structured data that can be extracted.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}