Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Restore and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Camille Drapier committed Dec 28, 2021
1 parent 89647dd commit 29ccc47
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions test/downloadoptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,35 @@ 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';
});

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);
Expand All @@ -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);
Expand Down

0 comments on commit 29ccc47

Please sign in to comment.