Remove protocol prepending (#66)
This code is no longer needed. Instead, we will enforce users to add the protocol themselves.
This commit is contained in:
@@ -47,23 +47,6 @@ describe("validateAuth", () => {
|
||||
expect(validateAuth).toThrowError(authErr);
|
||||
});
|
||||
|
||||
it("should append protocol if Connect host doesn't have it", () => {
|
||||
process.env[envConnectHost] = "localhost:8080";
|
||||
process.env[envConnectToken] = testConnectToken;
|
||||
expect(validateAuth).not.toThrowError(authErr);
|
||||
// The following lint error is not an issue because we are checking for the presence of the `http://` prefix;
|
||||
// we are not using it as an insecure connection protocol to link out to another resource.
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
expect(process.env[envConnectHost]).toBe("http://localhost:8080");
|
||||
});
|
||||
|
||||
it("should not append protocol if Connect host has one", () => {
|
||||
process.env[envConnectHost] = testConnectHost;
|
||||
process.env[envConnectToken] = testConnectToken;
|
||||
expect(validateAuth).not.toThrowError(authErr);
|
||||
expect(process.env[envConnectHost]).toBe(testConnectHost);
|
||||
});
|
||||
|
||||
it("should be authenticated as a Connect client", () => {
|
||||
process.env[envConnectHost] = testConnectHost;
|
||||
process.env[envConnectToken] = testConnectToken;
|
||||
|
||||
Reference in New Issue
Block a user