@mindconnect/mindconnect-nodejs
Version:
NodeJS Library for Siemens Insights Hub Connectivity - TypeScript SDK for Insights Hub and Industrial IoT - Command Line Interface - Insights Hub Development Proxy (Siemens Insights Hub was formerly known as MindSphere)
25 lines • 960 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const chai = require("chai");
require("url-search-params-polyfill");
const utils_1 = require("../src/api/utils");
chai.should();
describe("[SDK] TokenManager Auth", () => {
const auth = (0, utils_1.loadAuth)();
it("should update old service credentials configuration @sanity @s4f", () => {
const oldConfig = {
auth: "test",
gateway: "test",
iv: "test",
tenant: "test",
};
const newConfig = (0, utils_1.upgradeOldConfiguration)(oldConfig);
newConfig.should.exist;
newConfig.credentials.should.exist;
newConfig.credentials.length.should.equal(1);
newConfig.credentials[0].should.exist;
newConfig.credentials[0].selected.should.equal(true);
newConfig.credentials[0].type.should.equal("SERVICE");
});
});
//# sourceMappingURL=tokenmanager-auth.spec.js.map