From f4821ebc180d40a649c4cdf482a0eaf0c741272d Mon Sep 17 00:00:00 2001 From: Konstantin Epishev Date: Tue, 21 May 2024 13:54:50 +0200 Subject: [PATCH] back compatibility with old style jest runtime api (via #955) --- packages/allure-jest/README.md | 2 +- packages/allure-jest/src/index.ts | 20 +-- packages/allure-jest/src/model.ts | 8 +- .../spec/runtime/legacy/attachments.test.ts | 20 +++ .../spec/runtime/legacy/description.test.ts | 24 +++ .../spec/runtime/legacy/historyId.test.ts | 15 ++ .../test/spec/runtime/legacy/labels.test.ts | 39 ++++ .../test/spec/runtime/legacy/links.test.ts | 49 +++++ .../spec/runtime/legacy/parameters.test.ts | 35 ++++ .../test/spec/runtime/legacy/steps.test.ts | 168 ++++++++++++++++++ .../spec/runtime/legacy/testCaseId.test.ts | 15 ++ .../{ => runtime/modern}/attachments.test.ts | 2 +- .../{ => runtime/modern}/description.test.ts | 2 +- .../{ => runtime/modern}/historyId.test.ts | 2 +- .../spec/{ => runtime/modern}/labels.test.ts | 2 +- .../spec/{ => runtime/modern}/links.test.ts | 2 +- .../{ => runtime/modern}/parameters.test.ts | 2 +- .../spec/{ => runtime/modern}/steps.test.ts | 2 +- .../{ => runtime/modern}/testCaseId.test.ts | 2 +- 19 files changed, 389 insertions(+), 22 deletions(-) create mode 100644 packages/allure-jest/test/spec/runtime/legacy/attachments.test.ts create mode 100644 packages/allure-jest/test/spec/runtime/legacy/description.test.ts create mode 100644 packages/allure-jest/test/spec/runtime/legacy/historyId.test.ts create mode 100644 packages/allure-jest/test/spec/runtime/legacy/labels.test.ts create mode 100644 packages/allure-jest/test/spec/runtime/legacy/links.test.ts create mode 100644 packages/allure-jest/test/spec/runtime/legacy/parameters.test.ts create mode 100644 packages/allure-jest/test/spec/runtime/legacy/steps.test.ts create mode 100644 packages/allure-jest/test/spec/runtime/legacy/testCaseId.test.ts rename packages/allure-jest/test/spec/{ => runtime/modern}/attachments.test.ts (92%) rename packages/allure-jest/test/spec/{ => runtime/modern}/description.test.ts (93%) rename packages/allure-jest/test/spec/{ => runtime/modern}/historyId.test.ts (88%) rename packages/allure-jest/test/spec/{ => runtime/modern}/labels.test.ts (97%) rename packages/allure-jest/test/spec/{ => runtime/modern}/links.test.ts (96%) rename packages/allure-jest/test/spec/{ => runtime/modern}/parameters.test.ts (96%) rename packages/allure-jest/test/spec/{ => runtime/modern}/steps.test.ts (99%) rename packages/allure-jest/test/spec/{ => runtime/modern}/testCaseId.test.ts (88%) diff --git a/packages/allure-jest/README.md b/packages/allure-jest/README.md index dd49bdf93..6cf08e179 100644 --- a/packages/allure-jest/README.md +++ b/packages/allure-jest/README.md @@ -24,7 +24,7 @@ Use your favorite node package manager to install required packages: ```shell -npm add -D allure-jest allure-js-commons +npm add -D allure-jest ``` If you're using `jest` for testing `node` add following line to your `jest.config.js` file: diff --git a/packages/allure-jest/src/index.ts b/packages/allure-jest/src/index.ts index e7b8e53a7..cc5cc501c 100644 --- a/packages/allure-jest/src/index.ts +++ b/packages/allure-jest/src/index.ts @@ -5,6 +5,7 @@ import os from "node:os"; import { dirname, sep } from "node:path"; import process from "node:process"; import stripAnsi from "strip-ansi"; +import * as allure from "allure-js-commons"; import { ALLURE_TEST_RUNTIME_KEY, AllureNodeReporterRuntime, @@ -23,22 +24,14 @@ import { TestRuntime, getStatusFromError, getSuitesLabels, + setGlobalTestRuntime, } from "allure-js-commons/sdk/node"; -import { AllureJestConfig } from "./model.js"; +import { AllureJestConfig, AllureJestEnvironment } from "./model.js"; import { getTestId, getTestPath } from "./utils.js"; const { ALLURE_HOST_NAME, ALLURE_THREAD_NAME, JEST_WORKER_ID } = process.env; const hostname = os.hostname(); -export interface AllureJestEnvironment extends JestEnvironment { - handleAllureRuntimeMessage(payload: { currentTestName: string; message: RuntimeMessage }): void; -} - -export interface LinkMatcher { - type: LinkType | string; - urlTemplate: string; -} - class AllureJestTestRuntime implements TestRuntime { constructor( private jestEnvironment: AllureJestEnvironment, @@ -249,7 +242,12 @@ const createJestEnvironment = (Base: T): T => this.testPath = context.testPath.replace(config.globalConfig.rootDir, "").replace(sep, ""); // @ts-ignore - new AllureJestTestRuntime(this as AllureJestEnvironment, this.global); + const testRuntime = new AllureJestTestRuntime(this as AllureJestEnvironment, this.global); + + // @ts-ignore + this.global.allure = allure; + + setGlobalTestRuntime(testRuntime); } setup() { diff --git a/packages/allure-jest/src/model.ts b/packages/allure-jest/src/model.ts index 7157904a9..9ea6b844a 100644 --- a/packages/allure-jest/src/model.ts +++ b/packages/allure-jest/src/model.ts @@ -1,5 +1,9 @@ -import { JestEnvironmentConfig } from "@jest/environment"; -import { Config } from "allure-js-commons/sdk/node"; +import { JestEnvironment, JestEnvironmentConfig } from "@jest/environment"; +import { Config, RuntimeMessage } from "allure-js-commons/sdk/node"; + +export interface AllureJestEnvironment extends JestEnvironment { + handleAllureRuntimeMessage(payload: { currentTestName: string; message: RuntimeMessage }): void; +} export interface AllureJestConfig extends JestEnvironmentConfig { projectConfig: JestEnvironmentConfig["projectConfig"] & { diff --git a/packages/allure-jest/test/spec/runtime/legacy/attachments.test.ts b/packages/allure-jest/test/spec/runtime/legacy/attachments.test.ts new file mode 100644 index 000000000..ba68e6644 --- /dev/null +++ b/packages/allure-jest/test/spec/runtime/legacy/attachments.test.ts @@ -0,0 +1,20 @@ +import { expect, it } from "@jest/globals"; +import { runJestInlineTest } from "../../../utils"; + +it("handles json attachment", async () => { + const { tests, attachments } = await runJestInlineTest(` + it("json", async () => { + await allure.attachment("Request body", JSON.stringify({ foo: "bar" }), "application/json"); + }); + `); + + expect(tests).toHaveLength(1); + expect(tests[0].attachments).toHaveLength(1); + + const [attachment] = tests[0].attachments; + + expect(attachment.name).toBe("Request body"); + expect(Buffer.from(attachments[attachment.source] as string, "base64").toString("utf8")).toBe( + JSON.stringify({ foo: "bar" }), + ); +}); diff --git a/packages/allure-jest/test/spec/runtime/legacy/description.test.ts b/packages/allure-jest/test/spec/runtime/legacy/description.test.ts new file mode 100644 index 000000000..6dc6fc23b --- /dev/null +++ b/packages/allure-jest/test/spec/runtime/legacy/description.test.ts @@ -0,0 +1,24 @@ +import { expect, it } from "@jest/globals"; +import { runJestInlineTest } from "../../../utils"; + +it("sets description", async () => { + const { tests } = await runJestInlineTest(` + it("description", async () => { + await allure.description("foo"); + }) + `); + + expect(tests).toHaveLength(1); + expect(tests[0].description).toBe("foo"); +}); + +it("sets html description", async () => { + const { tests } = await runJestInlineTest(` + it("descriptionHtml", async () => { + await allure.descriptionHtml("foo"); + }) + `); + + expect(tests).toHaveLength(1); + expect(tests[0].descriptionHtml).toBe("foo"); +}); diff --git a/packages/allure-jest/test/spec/runtime/legacy/historyId.test.ts b/packages/allure-jest/test/spec/runtime/legacy/historyId.test.ts new file mode 100644 index 000000000..a737fdace --- /dev/null +++ b/packages/allure-jest/test/spec/runtime/legacy/historyId.test.ts @@ -0,0 +1,15 @@ +import { describe, expect, it } from "@jest/globals"; +import { runJestInlineTest } from "../../../utils"; + +describe("historyId", () => { + it("historyId", async () => { + const { tests } = await runJestInlineTest(` + it("historyId", async () => { + await allure.historyId("foo"); + }) + `); + + expect(tests).toHaveLength(1); + expect(tests[0].historyId).toBe("foo"); + }); +}); diff --git a/packages/allure-jest/test/spec/runtime/legacy/labels.test.ts b/packages/allure-jest/test/spec/runtime/legacy/labels.test.ts new file mode 100644 index 000000000..60d59680d --- /dev/null +++ b/packages/allure-jest/test/spec/runtime/legacy/labels.test.ts @@ -0,0 +1,39 @@ +import { expect, it } from "@jest/globals"; +import { LabelName } from "allure-js-commons"; +import { runJestInlineTest } from "../../../utils"; + +it("sets labels", async () => { + const { tests } = await runJestInlineTest(` + it("label", async () => { + await allure.label("foo", "bar"); + await allure.allureId("foo"); + await allure.epic("foo"); + await allure.feature("foo"); + await allure.layer("foo"); + await allure.owner("foo"); + await allure.parentSuite("foo"); + await allure.subSuite("foo"); + await allure.suite("foo"); + await allure.severity("foo"); + await allure.story("foo"); + await allure.tag("foo"); + await allure.labels({ name: "test", value: "testValue" }, { name: "test2", value: "testValue2" }); + }) + `); + + expect(tests).toHaveLength(1); + expect(tests[0].labels).toContainEqual({ name: "foo", value: "bar" }); + expect(tests[0].labels).toContainEqual({ name: LabelName.ALLURE_ID, value: "foo" }); + expect(tests[0].labels).toContainEqual({ name: LabelName.EPIC, value: "foo" }); + expect(tests[0].labels).toContainEqual({ name: LabelName.FEATURE, value: "foo" }); + expect(tests[0].labels).toContainEqual({ name: LabelName.LAYER, value: "foo" }); + expect(tests[0].labels).toContainEqual({ name: LabelName.OWNER, value: "foo" }); + expect(tests[0].labels).toContainEqual({ name: LabelName.PARENT_SUITE, value: "foo" }); + expect(tests[0].labels).toContainEqual({ name: LabelName.SUB_SUITE, value: "foo" }); + expect(tests[0].labels).toContainEqual({ name: LabelName.SUITE, value: "foo" }); + expect(tests[0].labels).toContainEqual({ name: LabelName.SEVERITY, value: "foo" }); + expect(tests[0].labels).toContainEqual({ name: LabelName.STORY, value: "foo" }); + expect(tests[0].labels).toContainEqual({ name: LabelName.TAG, value: "foo" }); + expect(tests[0].labels).toContainEqual({ name: "test", value: "testValue" }); + expect(tests[0].labels).toContainEqual({ name: "test2", value: "testValue2" }); +}); diff --git a/packages/allure-jest/test/spec/runtime/legacy/links.test.ts b/packages/allure-jest/test/spec/runtime/legacy/links.test.ts new file mode 100644 index 000000000..a6fc8849c --- /dev/null +++ b/packages/allure-jest/test/spec/runtime/legacy/links.test.ts @@ -0,0 +1,49 @@ +import { expect, it } from "@jest/globals"; +import { LinkType } from "allure-js-commons"; +import { runJestInlineTest } from "../../../utils"; + +it("sets links", async () => { + const { tests } = await runJestInlineTest(` + it("link", async () => { + await allure.link("https://allurereport.org"); + await allure.issue("1"); + await allure.issue("https://example.org/issues/2"); + await allure.tms("1"); + await allure.tms("https://example.org/tasks/2"); + await allure.links(...[{ url:"https://allurereport.org/1" }, { url:"https://allurereport.org/2" }]); + }) + `); + + expect(tests).toHaveLength(1); + expect(tests).toEqual([ + expect.objectContaining({ + links: [ + { + url: "https://allurereport.org", + }, + { + url: "https://example.org/issues/1", + type: LinkType.ISSUE, + }, + { + url: "https://example.org/issues/2", + type: LinkType.ISSUE, + }, + { + url: "https://example.org/tasks/1", + type: LinkType.TMS, + }, + { + url: "https://example.org/tasks/2", + type: LinkType.TMS, + }, + { + url: "https://allurereport.org/1", + }, + { + url: "https://allurereport.org/2", + }, + ], + }), + ]); +}); diff --git a/packages/allure-jest/test/spec/runtime/legacy/parameters.test.ts b/packages/allure-jest/test/spec/runtime/legacy/parameters.test.ts new file mode 100644 index 000000000..708148e3e --- /dev/null +++ b/packages/allure-jest/test/spec/runtime/legacy/parameters.test.ts @@ -0,0 +1,35 @@ +import { expect, it } from "@jest/globals"; +import { runJestInlineTest } from "../../../utils"; + +it("sets parameters", async () => { + const { tests } = await runJestInlineTest(` + it("parameter", async () => { + await allure.parameter("param1", "paramValue1"); + await allure.parameter("param2", "paramValue2", {excluded:true}); + await allure.parameter("param3", "paramValue3", {mode:"masked", excluded:true}); + await allure.parameter("param4", "paramValue4", {mode:"hidden"}); + }) + `); + + expect(tests).toHaveLength(1); + expect(tests).toEqual( + expect.arrayContaining([ + expect.objectContaining({ + parameters: [ + { name: "param1", value: "paramValue1" }, + { excluded: true, name: "param2", value: "paramValue2" }, + { excluded: true, mode: "masked", name: "param3", value: "paramValue3" }, + { mode: "hidden", name: "param4", value: "paramValue4" }, + ], + }), + expect.objectContaining({ + parameters: [ + { name: "param1", value: "paramValue1" }, + { excluded: true, name: "param2", value: "paramValue2" }, + { excluded: true, mode: "masked", name: "param3", value: "paramValue3" }, + { mode: "hidden", name: "param4", value: "paramValue4" }, + ], + }), + ]), + ); +}); diff --git a/packages/allure-jest/test/spec/runtime/legacy/steps.test.ts b/packages/allure-jest/test/spec/runtime/legacy/steps.test.ts new file mode 100644 index 000000000..31e9a8f2c --- /dev/null +++ b/packages/allure-jest/test/spec/runtime/legacy/steps.test.ts @@ -0,0 +1,168 @@ +import { expect, it } from "@jest/globals"; +import { Status } from "allure-js-commons"; +import { runJestInlineTest } from "../../../utils"; + +it("single step", async () => { + const { tests } = await runJestInlineTest( + ` + it("step", async () => { + await allure.step("foo", async () => { + await allure.label("foo", "bar"); + }); + }); + `, + ); + + expect(tests).toHaveLength(1); + expect(tests[0].labels).toContainEqual(expect.objectContaining({ name: "foo", value: "bar" })); + expect(tests[0].steps).toHaveLength(1); + expect(tests[0].steps).toContainEqual(expect.objectContaining({ name: "foo" })); +}); + +it("multiple steps", async () => { + const { tests } = await runJestInlineTest( + ` + it("step", async () => { + await allure.step("foo", async () => { + await allure.label("foo", "1"); + }); + + await allure.step("bar", async () => { + await allure.label("bar", "2"); + }); + + await allure.step("baz", async () => { + await allure.label("baz", "3"); + }); + }); + `, + ); + + expect(tests).toHaveLength(1); + expect(tests[0].labels).toContainEqual(expect.objectContaining({ name: "foo", value: "1" })); + expect(tests[0].labels).toContainEqual(expect.objectContaining({ name: "bar", value: "2" })); + expect(tests[0].labels).toContainEqual(expect.objectContaining({ name: "baz", value: "3" })); + expect(tests[0].steps).toHaveLength(3); + expect(tests[0].steps).toContainEqual(expect.objectContaining({ name: "foo" })); + expect(tests[0].steps).toContainEqual(expect.objectContaining({ name: "bar" })); + expect(tests[0].steps).toContainEqual(expect.objectContaining({ name: "baz" })); +}); + +it("nested steps", async () => { + const { tests } = await runJestInlineTest( + ` + it("step", async () => { + await allure.step("foo", async () => { + await allure.step("bar", async () => { + await allure.step("baz", async () => { + await allure.label("foo", "bar"); + }); + }); + }); + }); + `, + ); + + expect(tests).toHaveLength(1); + expect(tests[0].labels).toContainEqual(expect.objectContaining({ name: "foo", value: "bar" })); + expect(tests[0].steps).toHaveLength(1); + expect(tests[0].steps).toContainEqual(expect.objectContaining({ name: "foo" })); + expect(tests[0].steps[0].steps).toHaveLength(1); + expect(tests[0].steps[0].steps).toContainEqual(expect.objectContaining({ name: "bar" })); + expect(tests[0].steps[0].steps[0].steps).toHaveLength(1); + expect(tests[0].steps[0].steps[0].steps).toContainEqual(expect.objectContaining({ name: "baz" })); +}); + +it("step with attachments", async () => { + const { tests, attachments } = await runJestInlineTest( + ` + it("text attachment", async () => { + await allure.step("foo", async () => { + await allure.attachment("foo.txt", "bar", "text/plain"); + }) + }); + `, + ); + + expect(tests).toHaveLength(1); + expect(tests[0].attachments).toHaveLength(0); + expect(tests[0].steps).toHaveLength(1); + expect(tests[0].steps).toContainEqual(expect.objectContaining({ name: "foo" })); + + const [attachment] = tests[0].steps[0].attachments; + + expect(attachment.name).toBe("foo.txt"); + expect(Buffer.from(attachments[attachment.source] as string, "base64").toString("utf8")).toBe("bar"); +}); + +it("step with assertion error", async () => { + const { tests } = await runJestInlineTest( + ` + it("step", async () => { + await allure.step("foo", async () => { + expect(1).toBe(2); + }); + }); + `, + ); + + expect(tests).toHaveLength(1); + expect(tests[0].status).toBe(Status.FAILED); + expect(tests[0].steps).toHaveLength(1); + expect(tests[0].steps).toContainEqual( + expect.objectContaining({ + name: "foo", + status: Status.FAILED, + }), + ); +}); + +it("step with unexpected error", async () => { + const { tests } = await runJestInlineTest( + ` + it("step", async () => { + await allure.step("foo", async () => { + throw new Error("foo"); + }); + }); + `, + ); + + expect(tests).toHaveLength(1); + expect(tests[0].status).toBe(Status.BROKEN); + expect(tests[0].steps).toHaveLength(1); + expect(tests[0].steps[0]).toMatchObject({ + name: "foo", + status: Status.BROKEN, + }); +}); + +it("step runtime api", async () => { + const { tests } = await runJestInlineTest( + ` + it("step", async () => { + await allure.step("step", (ctx) => { + ctx.displayName("bar"); + ctx.parameter("p1", "v1"); + ctx.parameter("p2", "v2", "default"); + ctx.parameter("p3", "v3", "masked"); + ctx.parameter("p4", "v4", "hidden"); + }); + }); + `, + ); + + expect(tests).toHaveLength(1); + expect(tests[0].status).toEqual("passed"); + expect(tests[0].steps).toHaveLength(1); + const actualStep = tests[0].steps[0]; + expect(actualStep.status).toEqual("passed"); + expect(actualStep.name).toEqual("bar"); + expect(actualStep.parameters).toHaveLength(4); + expect(actualStep.parameters).toEqual([ + { name: "p1", value: "v1" }, + { name: "p2", value: "v2", mode: "default" }, + { name: "p3", value: "v3", mode: "masked" }, + { name: "p4", value: "v4", mode: "hidden" }, + ]); +}); diff --git a/packages/allure-jest/test/spec/runtime/legacy/testCaseId.test.ts b/packages/allure-jest/test/spec/runtime/legacy/testCaseId.test.ts new file mode 100644 index 000000000..aa88272d7 --- /dev/null +++ b/packages/allure-jest/test/spec/runtime/legacy/testCaseId.test.ts @@ -0,0 +1,15 @@ +import { describe, expect, it } from "@jest/globals"; +import { runJestInlineTest } from "../../../utils"; + +describe("testCaseId", () => { + it("testCaseId", async () => { + const { tests } = await runJestInlineTest(` + it("testCaseId", async () => { + await allure.testCaseId("foo"); + }) + `); + + expect(tests).toHaveLength(1); + expect(tests[0].testCaseId).toBe("foo"); + }); +}); diff --git a/packages/allure-jest/test/spec/attachments.test.ts b/packages/allure-jest/test/spec/runtime/modern/attachments.test.ts similarity index 92% rename from packages/allure-jest/test/spec/attachments.test.ts rename to packages/allure-jest/test/spec/runtime/modern/attachments.test.ts index 289639f50..c6eb857cd 100644 --- a/packages/allure-jest/test/spec/attachments.test.ts +++ b/packages/allure-jest/test/spec/runtime/modern/attachments.test.ts @@ -1,5 +1,5 @@ import { expect, it } from "@jest/globals"; -import { runJestInlineTest } from "../utils"; +import { runJestInlineTest } from "../../../utils"; it("handles json attachment", async () => { const { tests, attachments } = await runJestInlineTest(` diff --git a/packages/allure-jest/test/spec/description.test.ts b/packages/allure-jest/test/spec/runtime/modern/description.test.ts similarity index 93% rename from packages/allure-jest/test/spec/description.test.ts rename to packages/allure-jest/test/spec/runtime/modern/description.test.ts index 6b5987bf2..405558b68 100644 --- a/packages/allure-jest/test/spec/description.test.ts +++ b/packages/allure-jest/test/spec/runtime/modern/description.test.ts @@ -1,5 +1,5 @@ import { expect, it } from "@jest/globals"; -import { runJestInlineTest } from "../utils"; +import { runJestInlineTest } from "../../../utils"; it("sets description", async () => { const { tests } = await runJestInlineTest(` diff --git a/packages/allure-jest/test/spec/historyId.test.ts b/packages/allure-jest/test/spec/runtime/modern/historyId.test.ts similarity index 88% rename from packages/allure-jest/test/spec/historyId.test.ts rename to packages/allure-jest/test/spec/runtime/modern/historyId.test.ts index 5b4c1a35c..36c8a17bc 100644 --- a/packages/allure-jest/test/spec/historyId.test.ts +++ b/packages/allure-jest/test/spec/runtime/modern/historyId.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "@jest/globals"; -import { runJestInlineTest } from "../utils"; +import { runJestInlineTest } from "../../../utils"; describe("historyId", () => { it("historyId", async () => { diff --git a/packages/allure-jest/test/spec/labels.test.ts b/packages/allure-jest/test/spec/runtime/modern/labels.test.ts similarity index 97% rename from packages/allure-jest/test/spec/labels.test.ts rename to packages/allure-jest/test/spec/runtime/modern/labels.test.ts index b2b8cc53d..3b5e99207 100644 --- a/packages/allure-jest/test/spec/labels.test.ts +++ b/packages/allure-jest/test/spec/runtime/modern/labels.test.ts @@ -1,6 +1,6 @@ import { expect, it } from "@jest/globals"; import { LabelName } from "allure-js-commons"; -import { runJestInlineTest } from "../utils"; +import { runJestInlineTest } from "../../../utils"; it("sets labels", async () => { const { tests } = await runJestInlineTest(` diff --git a/packages/allure-jest/test/spec/links.test.ts b/packages/allure-jest/test/spec/runtime/modern/links.test.ts similarity index 96% rename from packages/allure-jest/test/spec/links.test.ts rename to packages/allure-jest/test/spec/runtime/modern/links.test.ts index 7383464bc..24db71ca0 100644 --- a/packages/allure-jest/test/spec/links.test.ts +++ b/packages/allure-jest/test/spec/runtime/modern/links.test.ts @@ -1,6 +1,6 @@ import { expect, it } from "@jest/globals"; import { LinkType } from "allure-js-commons"; -import { runJestInlineTest } from "../utils"; +import { runJestInlineTest } from "../../../utils"; it("sets links", async () => { const { tests } = await runJestInlineTest(` diff --git a/packages/allure-jest/test/spec/parameters.test.ts b/packages/allure-jest/test/spec/runtime/modern/parameters.test.ts similarity index 96% rename from packages/allure-jest/test/spec/parameters.test.ts rename to packages/allure-jest/test/spec/runtime/modern/parameters.test.ts index 93b504ec0..c61a9be67 100644 --- a/packages/allure-jest/test/spec/parameters.test.ts +++ b/packages/allure-jest/test/spec/runtime/modern/parameters.test.ts @@ -1,5 +1,5 @@ import { expect, it } from "@jest/globals"; -import { runJestInlineTest } from "../utils"; +import { runJestInlineTest } from "../../../utils"; it("sets parameters", async () => { const { tests } = await runJestInlineTest(` diff --git a/packages/allure-jest/test/spec/steps.test.ts b/packages/allure-jest/test/spec/runtime/modern/steps.test.ts similarity index 99% rename from packages/allure-jest/test/spec/steps.test.ts rename to packages/allure-jest/test/spec/runtime/modern/steps.test.ts index 264d30c15..b80184b40 100644 --- a/packages/allure-jest/test/spec/steps.test.ts +++ b/packages/allure-jest/test/spec/runtime/modern/steps.test.ts @@ -1,6 +1,6 @@ import { expect, it } from "@jest/globals"; import { Status } from "allure-js-commons"; -import { runJestInlineTest } from "../utils"; +import { runJestInlineTest } from "../../../utils"; it("single step", async () => { const { tests } = await runJestInlineTest( diff --git a/packages/allure-jest/test/spec/testCaseId.test.ts b/packages/allure-jest/test/spec/runtime/modern/testCaseId.test.ts similarity index 88% rename from packages/allure-jest/test/spec/testCaseId.test.ts rename to packages/allure-jest/test/spec/runtime/modern/testCaseId.test.ts index 45967086b..40e6442f2 100644 --- a/packages/allure-jest/test/spec/testCaseId.test.ts +++ b/packages/allure-jest/test/spec/runtime/modern/testCaseId.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "@jest/globals"; -import { runJestInlineTest } from "../utils"; +import { runJestInlineTest } from "../../../utils"; describe("testCaseId", () => { it("testCaseId", async () => {