Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 95dd6f7

Browse filesBrowse files
committed
Fix typo in getSuite(s)Labels
1 parent bb37acd commit 95dd6f7
Copy full SHA for 95dd6f7

File tree

Expand file treeCollapse file tree

5 files changed

+12
-14
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+12
-14
lines changed

‎packages/allure-cypress/src/reporter.ts

Copy file name to clipboardExpand all lines: packages/allure-cypress/src/reporter.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type Cypress from "cypress";
22
import { readFileSync } from "node:fs";
33
import { ContentType, LabelName, Stage } from "allure-js-commons";
44
import { extractMetadataFromString } from "allure-js-commons/sdk";
5-
import { FileSystemWriter, ReporterRuntime, getSuitesLabels } from "allure-js-commons/sdk/reporter";
5+
import { FileSystemWriter, ReporterRuntime, getSuiteLabels } from "allure-js-commons/sdk/reporter";
66
import type { CypressRuntimeMessage, CypressTestEndRuntimeMessage, CypressTestStartRuntimeMessage } from "./model.js";
77

88
export type AllureCypressConfig = {
@@ -45,7 +45,7 @@ export class AllureCypress {
4545
throw new Error("INTERNAL ERROR: Invalid message sequence");
4646
}
4747

48-
const suiteLabels = getSuitesLabels(startMessage.data.specPath.slice(0, -1));
48+
const suiteLabels = getSuiteLabels(startMessage.data.specPath.slice(0, -1));
4949
const testTitle = startMessage.data.specPath[startMessage.data.specPath.length - 1];
5050
const titleMetadata = extractMetadataFromString(testTitle);
5151
const testUuid = this.runtime.startTest({

‎packages/allure-jest/src/environmentFactory.ts

Copy file name to clipboardExpand all lines: packages/allure-jest/src/environmentFactory.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import * as allure from "allure-js-commons";
77
import { LabelName, Stage, Status } from "allure-js-commons";
88
import type { RuntimeMessage } from "allure-js-commons/sdk";
99
import { getMessageAndTraceFromError, getStatusFromError } from "allure-js-commons/sdk";
10-
import { FileSystemWriter, MessageWriter, ReporterRuntime, getSuitesLabels } from "allure-js-commons/sdk/reporter";
10+
import { FileSystemWriter, MessageWriter, ReporterRuntime, getSuiteLabels } from "allure-js-commons/sdk/reporter";
1111
import { setGlobalTestRuntime } from "allure-js-commons/sdk/runtime";
1212
import { AllureJestTestRuntime } from "./AllureJestTestRuntime.js";
1313
import type { AllureJestConfig, AllureJestEnvironment } from "./model.js";
@@ -159,7 +159,7 @@ const createJestEnvironment = <T extends typeof JestEnvironment>(Base: T): T =>
159159
result.labels.push({ name: LabelName.HOST, value: hostLabel });
160160
}
161161

162-
result.labels.push(...getSuitesLabels(newTestSuitesPath));
162+
result.labels.push(...getSuiteLabels(newTestSuitesPath));
163163
}, testUuid);
164164

165165
/**

‎packages/allure-js-commons/src/sdk/reporter/utils.ts

Copy file name to clipboardExpand all lines: packages/allure-js-commons/src/sdk/reporter/utils.ts
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,6 @@ export const getSuiteLabels = (suites: readonly string[]): Label[] => {
227227
return labels;
228228
};
229229

230-
export const getSuitesLabels = getSuiteLabels;
231-
232230
const suiteLabelNames: readonly string[] = [LabelName.PARENT_SUITE, LabelName.SUITE, LabelName.SUB_SUITE];
233231

234232
export const ensureSuiteLabels = (test: Partial<TestResult>, defaultSuites: readonly string[]) => {

‎packages/allure-js-commons/test/sdk/reporter/utils.spec.ts

Copy file name to clipboardExpand all lines: packages/allure-js-commons/test/sdk/reporter/utils.spec.ts
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { describe, expect, it } from "vitest";
22
import { LabelName } from "../../../src/model.js";
3-
import { getSuitesLabels, serialize, typeToExtension } from "../../../src/sdk/reporter/utils.js";
3+
import { getSuiteLabels, serialize, typeToExtension } from "../../../src/sdk/reporter/utils.js";
44

55
describe("typeToExtension", () => {
66
it("should respect provided file extension", () => {
@@ -46,16 +46,16 @@ describe("typeToExtension", () => {
4646
});
4747
});
4848

49-
describe("getSuitesLabels", () => {
49+
describe("getSuiteLabels", () => {
5050
describe("with empty suites", () => {
5151
it("returns empty array", () => {
52-
expect(getSuitesLabels([])).toEqual([]);
52+
expect(getSuiteLabels([])).toEqual([]);
5353
});
5454
});
5555

5656
describe("with single suite", () => {
5757
it("returns parent suite label as the first element", () => {
58-
expect(getSuitesLabels(["foo"])).toEqual([
58+
expect(getSuiteLabels(["foo"])).toEqual([
5959
{
6060
name: LabelName.PARENT_SUITE,
6161
value: "foo",
@@ -66,7 +66,7 @@ describe("getSuitesLabels", () => {
6666

6767
describe("with two suites", () => {
6868
it("returns parent suite and suite labels as the first two elements", () => {
69-
expect(getSuitesLabels(["foo", "bar"])).toEqual([
69+
expect(getSuiteLabels(["foo", "bar"])).toEqual([
7070
{
7171
name: LabelName.PARENT_SUITE,
7272
value: "foo",
@@ -81,7 +81,7 @@ describe("getSuitesLabels", () => {
8181

8282
describe("with three or more suites", () => {
8383
it("returns list of three elements where last one is a sub suite label", () => {
84-
expect(getSuitesLabels(["foo", "bar", "baz", "beep", "boop"])).toEqual([
84+
expect(getSuiteLabels(["foo", "bar", "baz", "beep", "boop"])).toEqual([
8585
{
8686
name: LabelName.PARENT_SUITE,
8787
value: "foo",

‎packages/allure-vitest/src/reporter.ts

Copy file name to clipboardExpand all lines: packages/allure-vitest/src/reporter.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
ReporterRuntime,
1313
getEnvironmentLabels,
1414
getHostLabel,
15-
getSuitesLabels,
15+
getSuiteLabels,
1616
getThreadLabel,
1717
} from "allure-js-commons/sdk/reporter";
1818
import { getSuitePath, getTestFullName } from "./utils.js";
@@ -107,7 +107,7 @@ export default class AllureVitestReporter implements Reporter {
107107
value: "javascript",
108108
});
109109
result.labels.push(...titleMetadata.labels);
110-
result.labels.push(...getSuitesLabels(suitePath));
110+
result.labels.push(...getSuiteLabels(suitePath));
111111
result.labels.push(...getEnvironmentLabels());
112112
result.labels.push(getHostLabel());
113113
result.labels.push(getThreadLabel(VITEST_POOL_ID && `vitest-worker-${VITEST_POOL_ID}`));

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.