@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)
30 lines • 1.82 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const sdk_1 = require("../src/api/sdk");
const utils_1 = require("../src/api/utils");
const test_utils_1 = require("./test-utils");
describe("[SDK] IotTsBulkUpload", () => {
const auth = (0, utils_1.loadAuth)();
it("should instantiate", () => __awaiter(void 0, void 0, void 0, function* () {
const tsBulkUpload = new sdk_1.TimeSeriesBulkClient(Object.assign(Object.assign({}, auth), { basicAuth: (0, utils_1.decrypt)(auth, (0, test_utils_1.getPasskeyForUnitTest)()) }));
tsBulkUpload.should.exist;
}));
it("should renew token", () => __awaiter(void 0, void 0, void 0, function* () {
const tsBulkUpload = new sdk_1.TimeSeriesBulkClient(Object.assign(Object.assign({}, auth), { basicAuth: (0, utils_1.decrypt)(auth, (0, test_utils_1.getPasskeyForUnitTest)()) }));
tsBulkUpload.should.exist;
const result = yield tsBulkUpload.RenewToken();
result.should.be.true;
const token = tsBulkUpload.GetToken();
token.should.exist;
}));
});
//# sourceMappingURL=iot-ts-bulk-upload.spec.js.map