-
Notifications
You must be signed in to change notification settings - Fork 127
Expand file tree
/
Copy pathskipped.test.ts
More file actions
62 lines (60 loc) · 2.01 KB
/
skipped.test.ts
File metadata and controls
62 lines (60 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import { expect, it } from "vitest";
import { Status } from "allure-js-commons";
import { runCodeceptJsInlineTest } from "../utils.js";
it("doesn't report skipped features and steps", async () => {
const { tests } = await runCodeceptJsInlineTest({
"skipped_feature1.test.js": `
xFeature("logout-feature1");
Scenario("logout-scenario1", async () => {});
`,
"skipped_feature2.test.js": `
Feature.skip("logout-feature2");
Scenario("logout-scenario1", async () => {});
`,
"skipped_scenario1.test.js": `
Feature("logout-feature3");
xScenario("logout-scenario1", async () => {});
`,
"skipped_scenario2.test.js": `
Feature("logout-feature4");
Scenario.skip("logout-scenario1", async () => {});
`,
});
expect(tests).toHaveLength(4);
expect(tests).toEqual(
expect.arrayContaining([
expect.objectContaining({
fullName: "dummy:skipped_feature1.test.js: logout-feature1 > logout-scenario1",
name: "logout-scenario1",
status: Status.SKIPPED,
statusDetails: expect.objectContaining({
message: "Test skipped",
}),
}),
expect.objectContaining({
fullName: "dummy:skipped_feature2.test.js: logout-feature2 > logout-scenario1",
name: "logout-scenario1",
status: Status.SKIPPED,
statusDetails: expect.objectContaining({
message: "Test skipped",
}),
}),
expect.objectContaining({
fullName: "dummy:skipped_scenario1.test.js: logout-feature3 > logout-scenario1",
name: "logout-scenario1",
status: Status.SKIPPED,
statusDetails: expect.objectContaining({
message: "Test skipped",
}),
}),
expect.objectContaining({
fullName: "dummy:skipped_scenario2.test.js: logout-feature4 > logout-scenario1",
name: "logout-scenario1",
status: Status.SKIPPED,
statusDetails: expect.objectContaining({
message: "Test skipped",
}),
}),
]),
);
});