2016-07-27 23:22:06 +00:00
|
|
|
import "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: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
|
|
|
})
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|