aboutsummaryrefslogtreecommitdiff
path: root/test/getOptions.js
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2020-04-23 21:08:35 +0300
committerGitHub <[email protected]>2020-04-23 11:08:35 -0700
commit3647673f9e43ea973ebed65a891e897415cb2389 (patch)
tree23d34a1565e8dc75b1f5623c4ea6846eb2b6738c /test/getOptions.js
parentff21930515e15e367a3d033230d0c5def75fc206 (diff)
downloadnode-coveralls-3647673f9e43ea973ebed65a891e897415cb2389.tar.xz
node-coveralls-3647673f9e43ea973ebed65a891e897415cb2389.zip
Minor lint tweaks (#285)
Diffstat (limited to 'test/getOptions.js')
-rw-r--r--test/getOptions.js50
1 files changed, 28 insertions, 22 deletions
diff --git a/test/getOptions.js b/test/getOptions.js
index 4ff32d5..8ed95c6 100644
--- a/test/getOptions.js
+++ b/test/getOptions.js
@@ -134,10 +134,10 @@ describe('getOptions', () => {
it('should set service_name if it exists', done => {
testServiceName(getOptions, done);
});
- it ("should set service_number if it exists", done => {
+ it('should set service_number if it exists', done => {
testServiceNumber(getOptions, done);
});
- it("should set service_pull_request if it exists", done => {
+ it('should set service_pull_request if it exists', done => {
testServicePullRequest(getOptions, done);
});
it('should set service_name and service_job_id if it\'s running on travis-ci', done => {
@@ -164,7 +164,7 @@ describe('getOptions', () => {
it('should set service_name and service_job_id if it\'s running on Gitlab', done => {
testGitlab(getOptions, done);
});
- it ("should set service_name and service_job_id if it's running on AppVeyor", done => {
+ it('should set service_name and service_job_id if it\'s running on AppVeyor', done => {
testAppVeyor(getOptions, done);
});
it('should set service_name and service_job_id if it\'s running via Surf', done => {
@@ -565,26 +565,32 @@ const testGitlab = (sut, done) => {
});
};
-const testAppVeyor = function(sut, done) {
+const testAppVeyor = (sut, done) => {
process.env.APPVEYOR = true;
- process.env.APPVEYOR_BUILD_ID = "1234";
- process.env.APPVEYOR_BUILD_NUMBER = "5678";
- process.env.APPVEYOR_REPO_COMMIT = "e3e3e3e3e3e3e3e3e";
- process.env.APPVEYOR_REPO_BRANCH = "feature";
-
- sut(function(err, options){
- options.service_name.should.equal("appveyor");
- options.service_job_id.should.equal("1234");
- options.service_job_number.should.equal("5678");
- options.git.should.eql({ head:
- { id: 'e3e3e3e3e3e3e3e3e',
- author_name: 'Unknown Author',
- author_email: '',
- committer_name: 'Unknown Committer',
- committer_email: '',
- message: 'Unknown Commit Message' },
- branch: 'feature',
- remotes: [] });
+ process.env.APPVEYOR_BUILD_ID = '1234';
+ process.env.APPVEYOR_BUILD_NUMBER = '5678';
+ process.env.APPVEYOR_REPO_COMMIT = 'e3e3e3e3e3e3e3e3e';
+ process.env.APPVEYOR_REPO_BRANCH = 'feature';
+
+ const git = {
+ head: {
+ id: 'e3e3e3e3e3e3e3e3e',
+ author_name: 'Unknown Author',
+ author_email: '',
+ committer_name: 'Unknown Committer',
+ committer_email: '',
+ message: 'Unknown Commit Message'
+ },
+ branch: 'feature',
+ remotes: []
+ };
+
+ sut((err, options) => {
+ should.not.exist(err);
+ options.service_name.should.equal('appveyor');
+ options.service_job_id.should.equal('1234');
+ options.service_job_number.should.equal('5678');
+ options.git.should.eql(git);
done();
});
};