2016-07-27 23:22:06 +00:00
|
|
|
"use strict";
|
|
|
|
require("typings-test");
|
2016-03-22 23:12:17 +00:00
|
|
|
var smartci = require("../dist/index.js");
|
|
|
|
var should = require("should");
|
|
|
|
process.env.TRAVIS_JOB_NUMBER = "180.3";
|
|
|
|
process.env.CI = "true";
|
|
|
|
describe("smartci", function () {
|
|
|
|
describe("check", function () {
|
|
|
|
describe(".isCi", function () {
|
|
|
|
it("should state if we are in a CI environment", function () {
|
2016-07-27 23:22:06 +00:00
|
|
|
smartci.isCi().should.be.true();
|
2016-03-22 23:12:17 +00:00
|
|
|
process.env.CI = "false";
|
2016-07-27 23:22:06 +00:00
|
|
|
smartci.isCi().should.be.false();
|
2016-03-22 23:12:17 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
describe(".isTaggedCommit", function () {
|
|
|
|
it("should state if we are dealing with a tagged commit", function () {
|
2016-07-27 23:32:53 +00:00
|
|
|
delete process.env["CI_BUILD_TAG"];
|
2016-07-27 23:22:06 +00:00
|
|
|
smartci.isTaggedCommit().should.be.false();
|
|
|
|
process.env.CI_BUILD_TAG = "3.1.2";
|
|
|
|
smartci.isTaggedCommit().should.be.true();
|
2016-03-22 23:12:17 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
2016-07-27 23:32:53 +00:00
|
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sY0FBYyxDQUFDLENBQUE7QUFDdEIsSUFBSSxPQUFPLEdBQUcsT0FBTyxDQUFDLGtCQUFrQixDQUFDLENBQUM7QUFDMUMsSUFBSSxNQUFNLEdBQUcsT0FBTyxDQUFDLFFBQVEsQ0FBQyxDQUFDO0FBRS9CLE9BQU8sQ0FBQyxHQUFHLENBQUMsaUJBQWl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