From b095a8b50f6cb8508acdac18b393c7a9f6e1d209 Mon Sep 17 00:00:00 2001 From: Jeremy Dorn Date: Thu, 18 Apr 2024 14:59:56 -0500 Subject: [PATCH] Lint fixes --- lib/util.js | 2 +- test/unit/util_test.js | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/util.js b/lib/util.js index fe193f446..ccaca1599 100644 --- a/lib/util.js +++ b/lib/util.js @@ -511,7 +511,7 @@ exports.userAgent = userAgent; * @returns {string} host name */ exports.constructHostname = function (region, account) { - if (region === "us-west-2") { + if (region === 'us-west-2') { region = null; } diff --git a/test/unit/util_test.js b/test/unit/util_test.js index fb110d3ac..821f0d597 100644 --- a/test/unit/util_test.js +++ b/test/unit/util_test.js @@ -727,39 +727,39 @@ describe('Util', function () { } }); - describe("Util.constructHostname", () => { - it("works with undefined region", () => { + describe('Util.constructHostname', () => { + it('works with undefined region', () => { assert.strictEqual( - Util.constructHostname(undefined, "abc123"), - "abc123.snowflakecomputing.com" + Util.constructHostname(undefined, 'abc123'), + 'abc123.snowflakecomputing.com' ); }); - it("adds region to the account", () => { + it('adds region to the account', () => { assert.strictEqual( - Util.constructHostname("us-west-1", "abc123"), - "abc123.us-west-1.snowflakecomputing.com" + Util.constructHostname('us-west-1', 'abc123'), + 'abc123.us-west-1.snowflakecomputing.com' ); }); - it("Skips region when it is us-west-2", () => { + it('Skips region when it is us-west-2', () => { assert.strictEqual( - Util.constructHostname("us-west-2", "abc123"), - "abc123.snowflakecomputing.com" + Util.constructHostname('us-west-2', 'abc123'), + 'abc123.snowflakecomputing.com' ); }); - it("Ignores the account region when a different region is specified", () => { + it('Ignores the account region when a different region is specified', () => { assert.strictEqual( - Util.constructHostname("us-east-2", "abc123.us-east-1"), - "abc123.us-east-2.snowflakecomputing.com" + Util.constructHostname('us-east-2', 'abc123.us-east-1'), + 'abc123.us-east-2.snowflakecomputing.com' ); }); - it("Uses account region when there is no other region specified", () => { + it('Uses account region when there is no other region specified', () => { assert.strictEqual( - Util.constructHostname(undefined, "abc123.us-east-1"), - "abc123.us-east-1.snowflakecomputing.com" + Util.constructHostname(undefined, 'abc123.us-east-1'), + 'abc123.us-east-1.snowflakecomputing.com' ); }); });