Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jdorn committed Apr 18, 2024
1 parent 9b173f5 commit d92e25c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
32 changes: 16 additions & 16 deletions test/unit/util_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
);
});
});
Expand Down

0 comments on commit d92e25c

Please sign in to comment.