[Pkg-javascript-commits] [node-coveralls] 69/332: add tests for circleci integration
Bastien Roucariès
rouca at moszumanska.debian.org
Thu Nov 9 13:53:41 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-coveralls.
commit a3436f94ab8adf8075898ca63f11ff328cd054d4
Author: Gabe Hayes <gabriel.hayes at gmail.com>
Date: Thu Jul 25 13:33:26 2013 -0700
add tests for circleci integration
---
test/getOptions.js | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/test/getOptions.js b/test/getOptions.js
index 5c20c5c..501eb51 100644
--- a/test/getOptions.js
+++ b/test/getOptions.js
@@ -8,7 +8,7 @@ describe("getOptions", function(){
it ("should get a filepath if there is one", function(){
process.argv[2] = "somepath";
getOptions().filepath.should.equal("somepath");
-
+
});
it ("should get a filepath if there is one, even in verbose mode", function(){
process.argv[2] = "--verbose";
@@ -59,5 +59,21 @@ describe("getOptions", function(){
message: 'Unknown Commit Message' },
branch: 'master' });
});
-
+ it ("should set service_name and service_job_id if it's running on circleci", function(){
+ process.env.CIRCLECI = true;
+ process.env.CIRCLE_BRANCH = "master";
+ process.env.CIRCLE_BUILD_NUM = "1234";
+ process.env.CIRCLE_SHA1 = "e3e3e3e3e3e3e3e3e";
+ var options = getOptions();
+ options.service_name.should.equal("circleci");
+ options.service_job_id.should.equal("1234");
+ options.git.should.eql({ head:
+ { id: 'e3e3e3e3e3e3e3e3e',
+ author_name: 'Unknown Author',
+ author_email: '',
+ committer_name: 'Unknown Committer',
+ committer_email: '',
+ message: 'Unknown Commit Message' },
+ branch: 'master' });
+ });
});
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-coveralls.git
More information about the Pkg-javascript-commits
mailing list