Skip to main content
Home
Works with
This package works with Node.js, Deno, BrowsersIt is unknown whether this package works with Cloudflare Workers, Bun
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
This package works with Browsers
JSR Score100%
License
MIT
Downloads26/wk
Published3 days ago (4.0.0)

ts-juni2json provides a converter that convert JUnit XML format to JSON. Also provides TypeScript types definition. And also provide CLI that can convert a JUnit XML to JSON.

Functions

f
parse(
xmlString: convertableToString,
xml2jsOptions?: OptionsV2
): Promise<TestSuites | TestSuite | undefined | null>

Parses the given JUnit XML string into a JavaScript object representation using xml2js library.

Type Aliases

T
Details = { message?: string; type?: string; inner?: string; }

It represents a <failure> and <errors> tag.

  • inner: string
    No documentation available
  • message: string
    No documentation available
  • type: string
    No documentation available
T
Property = { name?: string; value?: string; }

It represents a <properties> tag.

  • name: string
    No documentation available
  • value: string
    No documentation available
T
Skipped = { message?: string; }

It represents a <skipped> tag.

  • message: string
    No documentation available
T
TestCase = { name?: string; classname?: string; assertions?: number; time?: number; status?: string; skipped?: Skipped[]; error?: Details[]; failure?: Details[]; system-out?: string[]; system-err?: string[]; }

It represents a <testcase> tag.

  • assertions: number
    No documentation available
  • classname: string
    No documentation available
  • error: Details[]
    No documentation available
  • failure: Details[]
    No documentation available
  • name: string
    No documentation available
  • skipped: Skipped[]
    No documentation available
  • status: string
    No documentation available
  • system-err: string[]
    No documentation available
  • system-out: string[]
    No documentation available
  • time: number
    No documentation available
T
TestSuite = { testcase?: TestCase[]; name?: string; tests?: number; failures?: number; errors?: number; time?: number; disabled?: number; skipped?: number; timestamp?: string; hostname?: string; id?: string; package?: string; properties?: Property[]; system-out?: string[]; system-err?: string[]; }

It represents a <testsuite> tag.

  • disabled: number
    No documentation available
  • errors: number
    No documentation available
  • failures: number
    No documentation available
  • hostname: string
    No documentation available
  • id: string
    No documentation available
  • name: string
    No documentation available
  • package: string
    No documentation available
  • properties: Property[]
    No documentation available
  • skipped: number
    No documentation available
  • system-err: string[]
    No documentation available
  • system-out: string[]
    No documentation available
  • testcase: TestCase[]
    No documentation available
  • tests: number
    No documentation available
  • time: number
    No documentation available
  • timestamp: string
    No documentation available
T
TestSuites = { testsuite?: TestSuite[]; name?: string; time?: number; tests?: number; failures?: number; errors?: number; disabled?: number; }

It represents a <testsuites> tag.

  • disabled: number
    No documentation available
  • errors: number
    No documentation available
  • failures: number
    No documentation available
  • name: string
    No documentation available
  • tests: number
    No documentation available
  • testsuite: TestSuite[]
    No documentation available
  • time: number
    No documentation available

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@kesin11/junit2json

Import symbol

import * as mod from "@kesin11/junit2json";
or

Import directly with a jsr specifier

import * as mod from "jsr:@kesin11/junit2json";