forked from Qytera-Gmbh/cypress-xray-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.spec.ts
78 lines (74 loc) · 2.37 KB
/
index.spec.ts
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import { expect } from "chai";
import {
CypressXrayPluginOptions,
addXrayResultUpload,
configureXrayPlugin,
syncFeatureFile,
} from "./index";
// Make sure there are no accidental breaking changes for the plugin's exported members.
// If there were, the compiler would complain about these tests.
// These tests therefore somewhat simulate a real use case.
describe("the plugin exports should work", () => {
it("addXrayResultUpload", () => {
expect(addXrayResultUpload).to.be.a("function");
});
it("configureXrayPlugin", () => {
expect(configureXrayPlugin).to.be.a("function");
});
it("addXrayResultUpload", () => {
expect(syncFeatureFile).to.be.a("function");
});
describe("CypressXrayPluginOptions", () => {
it("jira", () => {
const options: CypressXrayPluginOptions = {
jira: {
projectKey: "CYP-123",
url: "https://example.org",
},
};
expect(options.jira).to.exist;
});
it("xray", () => {
const options: CypressXrayPluginOptions = {
jira: {
projectKey: "CYP-123",
url: "https://example.org",
},
xray: {},
};
expect(options.xray).to.exist;
});
it("cucumber", () => {
const options: CypressXrayPluginOptions = {
jira: {
projectKey: "CYP-123",
url: "https://example.org",
},
cucumber: {
featureFileExtension: ".feature",
},
};
expect(options.cucumber).to.exist;
});
it("plugin", () => {
const options: CypressXrayPluginOptions = {
jira: {
projectKey: "CYP-123",
url: "https://example.org",
},
plugin: {},
};
expect(options.plugin).to.exist;
});
it("openSSL", () => {
const options: CypressXrayPluginOptions = {
jira: {
projectKey: "CYP-123",
url: "https://example.org",
},
openSSL: {},
};
expect(options.openSSL).to.exist;
});
});
});