Skip to content

Commit db5eb6b

Browse files
Added the host.ci property to the toJSON() method
1 parent c089ae7 commit db5eb6b

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

src/host.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export interface HostJSON {
6565
global: string;
6666
os: OSInfo;
6767
env: EnvironmentVariables;
68+
ci: false | CIInfo;
6869
node: false | NodeInfo;
6970
browser: false | Browsers;
7071
}

src/to-json.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export function toJSON(this: Host): HostJSON {
1010
global: Object.prototype.toString.call(this.global),
1111
os: this.os,
1212
env: this.env,
13+
ci: this.ci,
1314
node: this.node,
1415
browser: this.browser,
1516
};

test/specs/to-json.spec.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ describe("host.toJSON()", () => {
2020
"global",
2121
"os",
2222
"env",
23+
"ci",
2324
"browser",
2425
"node",
2526
]);
@@ -41,6 +42,7 @@ describe("host.toJSON()", () => {
4142
let result = host.toJSON();
4243
expect(result.os).to.deep.equal(host.os);
4344
expect(result.env).to.deep.equal(host.env);
45+
expect(result.ci).to.deep.equal(host.ci);
4446
expect(result.browser).to.deep.equal(host.browser);
4547
expect(result.node).to.deep.equal(host.node);
4648
});

0 commit comments

Comments
 (0)