Skip to content

Commit

Permalink
feat(reader): cucumber json reader WIP (via #21)
Browse files Browse the repository at this point in the history
  • Loading branch information
delatrie authored Dec 18, 2024
1 parent b66bf0c commit 2049534
Show file tree
Hide file tree
Showing 104 changed files with 4,245 additions and 38 deletions.
11 changes: 3 additions & 8 deletions packages/reader/src/allure1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@ import type {
} from "@allurereport/reader-api";
import { XMLParser } from "fast-xml-parser";
import * as console from "node:console";
import {
cleanBadXmlCharacters,
ensureInt,
ensureString,
isStringAnyRecord,
isStringAnyRecordArray,
} from "../xml-utils.js";
import { ensureInt, ensureString } from "../utils.js";
import { cleanBadXmlCharacters, isStringAnyRecord, isStringAnyRecordArray } from "../xml-utils.js";

const arrayTags: Set<string> = new Set([
"test-suite.test-cases.test-case",
Expand Down Expand Up @@ -143,7 +138,7 @@ const parseSteps = (element: unknown): RawTestStepResult[] | undefined => {
const steps = parseSteps(stepsElement);

return {
name: ensureString(title, ensureString(name)),
name: ensureString(title) ?? ensureString(name),
status: convertStatus(ensureString(status)),
start,
stop,
Expand Down
10 changes: 2 additions & 8 deletions packages/reader/src/allure2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,8 @@ import * as console from "node:console";
import { randomUUID } from "node:crypto";
import type { Category, ExecutorInfo } from "../model.js";
import { parseProperties } from "../properties.js";
import {
cleanBadXmlCharacters,
ensureBoolean,
ensureInt,
ensureString,
isStringAnyRecord,
isStringAnyRecordArray,
} from "../xml-utils.js";
import { ensureBoolean, ensureInt, ensureString } from "../utils.js";
import { cleanBadXmlCharacters, isStringAnyRecord, isStringAnyRecordArray } from "../xml-utils.js";
import type {
Attachment,
FixtureResult,
Expand Down
Loading

0 comments on commit 2049534

Please sign in to comment.