diff --git a/test/downloadoptions.js b/test/downloadoptions.js index 811ada1c9..257fbf576 100644 --- a/test/downloadoptions.js +++ b/test/downloadoptions.js @@ -68,6 +68,23 @@ describe('util', function() { }); }); + describe('with SASS_REJECT_UNAUTHORIZED set to false', function() { + beforeEach(function() { + process.env.SASS_REJECT_UNAUTHORIZED = '0'; + }); + + it('should look as we expect', function() { + var expected = { + strictSSL: false, + timeout: 60000, + headers: { + 'User-Agent': ua(), + }, + }; + assert.deepStrictEqual(opts(), expected); + }); + }); + describe('with SASS_REJECT_UNAUTHORIZED set to true', function() { beforeEach(function() { process.env.SASS_REJECT_UNAUTHORIZED = '1'; @@ -75,12 +92,11 @@ describe('util', function() { it('should look as we expect', function() { var expected = { - rejectUnauthorized: true, + strictSSL: true, timeout: 60000, headers: { 'User-Agent': ua(), }, - encoding: null, }; assert.deepStrictEqual(opts(), expected); @@ -94,12 +110,11 @@ describe('util', function() { it('should look as we expect', function() { var expected = { - rejectUnauthorized: true, + strictSSL: true, timeout: 60000, headers: { 'User-Agent': ua(), }, - encoding: null, }; assert.deepStrictEqual(opts(), expected);