diff options
| author | XhmikosR <[email protected]> | 2020-04-23 21:08:35 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-04-23 11:08:35 -0700 |
| commit | 3647673f9e43ea973ebed65a891e897415cb2389 (patch) | |
| tree | 23d34a1565e8dc75b1f5623c4ea6846eb2b6738c /test | |
| parent | ff21930515e15e367a3d033230d0c5def75fc206 (diff) | |
| download | node-coveralls-3647673f9e43ea973ebed65a891e897415cb2389.tar.xz node-coveralls-3647673f9e43ea973ebed65a891e897415cb2389.zip | |
Minor lint tweaks (#285)
Diffstat (limited to 'test')
| -rw-r--r-- | test/convertLcovToCoveralls.js | 2 | ||||
| -rw-r--r-- | test/getOptions.js | 50 |
2 files changed, 29 insertions, 23 deletions
diff --git a/test/convertLcovToCoveralls.js b/test/convertLcovToCoveralls.js index 4ce10d2..92ee40d 100644 --- a/test/convertLcovToCoveralls.js +++ b/test/convertLcovToCoveralls.js @@ -93,7 +93,7 @@ describe('convertLcovToCoveralls', () => { fs.existsSync = originalExistsSync; should.not.exist(err); - output.source_files[0].name.should.equal(path.posix.join("svgo", "config.js")); + output.source_files[0].name.should.equal(path.posix.join('svgo', 'config.js')); done(); }); }); 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(); }); }; |
