@tellescope/sdk 1.4.94 → 1.4.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/enduser.d.ts +24 -0
- package/lib/cjs/enduser.d.ts.map +1 -1
- package/lib/cjs/sdk.d.ts +34 -3
- package/lib/cjs/sdk.d.ts.map +1 -1
- package/lib/cjs/sdk.js +5 -1
- package/lib/cjs/sdk.js.map +1 -1
- package/lib/cjs/session.d.ts +0 -1
- package/lib/cjs/session.d.ts.map +1 -1
- package/lib/cjs/tests/tests.js +210 -47
- package/lib/cjs/tests/tests.js.map +1 -1
- package/lib/esm/enduser.d.ts +24 -0
- package/lib/esm/enduser.d.ts.map +1 -1
- package/lib/esm/sdk.d.ts +32 -1
- package/lib/esm/sdk.d.ts.map +1 -1
- package/lib/esm/sdk.js +5 -1
- package/lib/esm/sdk.js.map +1 -1
- package/lib/esm/tests/tests.js +210 -47
- package/lib/esm/tests/tests.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/src/sdk.ts +21 -5
- package/src/tests/tests.ts +148 -4
package/lib/cjs/tests/tests.js
CHANGED
|
@@ -2914,7 +2914,7 @@ var formsUnsubmittedCancelConditionTest = function () { return __awaiter(void 0,
|
|
|
2914
2914
|
}] })];
|
|
2915
2915
|
case 17:
|
|
2916
2916
|
_a.sent();
|
|
2917
|
-
return [4 /*yield*/, (0, testing_1.wait)(undefined,
|
|
2917
|
+
return [4 /*yield*/, (0, testing_1.wait)(undefined, 4000)]; // allow background creation with generous pause
|
|
2918
2918
|
case 18:
|
|
2919
2919
|
_a.sent(); // allow background creation with generous pause
|
|
2920
2920
|
return [4 /*yield*/, (0, testing_1.async_test)("FormsUnsubmitted cancel conditions work", function () { return sdk.api.automated_actions.getSome(); }, { onResult: function (as) {
|
|
@@ -3038,7 +3038,7 @@ var formsUnsubmittedTest = function () { return __awaiter(void 0, void 0, void 0
|
|
|
3038
3038
|
case 9:
|
|
3039
3039
|
form_responses = _a.sent();
|
|
3040
3040
|
// allow fast followup to trigger
|
|
3041
|
-
return [4 /*yield*/, (0, testing_1.wait)(undefined,
|
|
3041
|
+
return [4 /*yield*/, (0, testing_1.wait)(undefined, 5000)]; // allow background creation with generous pause
|
|
3042
3042
|
case 10:
|
|
3043
3043
|
// allow fast followup to trigger
|
|
3044
3044
|
_a.sent(); // allow background creation with generous pause
|
|
@@ -3059,7 +3059,7 @@ var formsUnsubmittedTest = function () { return __awaiter(void 0, void 0, void 0
|
|
|
3059
3059
|
case 12:
|
|
3060
3060
|
// trigger cancel conditions
|
|
3061
3061
|
_a.sent();
|
|
3062
|
-
return [4 /*yield*/, (0, testing_1.wait)(undefined,
|
|
3062
|
+
return [4 /*yield*/, (0, testing_1.wait)(undefined, 5000)]; // allow background creation with generous pause
|
|
3063
3063
|
case 13:
|
|
3064
3064
|
_a.sent(); // allow background creation with generous pause
|
|
3065
3065
|
return [4 /*yield*/, (0, testing_1.async_test)("formResponses not triggered yet after 1 form remaining", function () { return sdk.api.endusers.getOne(enduser.id); }, { onResult: function (e) { var _a; return ((_a = e === null || e === void 0 ? void 0 : e.journeys) === null || _a === void 0 ? void 0 : _a[journey.id]) !== 'formsSubmitted'; } })];
|
|
@@ -3075,7 +3075,7 @@ var formsUnsubmittedTest = function () { return __awaiter(void 0, void 0, void 0
|
|
|
3075
3075
|
}] })];
|
|
3076
3076
|
case 15:
|
|
3077
3077
|
_a.sent();
|
|
3078
|
-
return [4 /*yield*/, (0, testing_1.wait)(undefined,
|
|
3078
|
+
return [4 /*yield*/, (0, testing_1.wait)(undefined, 5000)]; // allow background creation with generous pause
|
|
3079
3079
|
case 16:
|
|
3080
3080
|
_a.sent(); // allow background creation with generous pause
|
|
3081
3081
|
return [4 /*yield*/, (0, testing_1.async_test)("formResponses triggered after both forms submitted", function () { return sdk.api.endusers.getOne(enduser.id); }, { onResult: function (e) { var _a; return ((_a = e === null || e === void 0 ? void 0 : e.journeys) === null || _a === void 0 ? void 0 : _a[journey.id]) === 'formsSubmitted'; } })];
|
|
@@ -4489,8 +4489,168 @@ var role_based_access_permissions_tests = function () { return __awaiter(void 0,
|
|
|
4489
4489
|
});
|
|
4490
4490
|
}); };
|
|
4491
4491
|
exports.role_based_access_permissions_tests = role_based_access_permissions_tests;
|
|
4492
|
+
// runs tests and resets availability afterwards
|
|
4493
|
+
// creates a new enduser (to avoid duplicate autoreply)
|
|
4494
|
+
var run_autoreply_test = function (title, _a) {
|
|
4495
|
+
var expectingAutoreply = _a.expectingAutoreply;
|
|
4496
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
4497
|
+
var enduser, room, blocks;
|
|
4498
|
+
return __generator(this, function (_b) {
|
|
4499
|
+
switch (_b.label) {
|
|
4500
|
+
case 0:
|
|
4501
|
+
(0, testing_1.log_header)("Autoreply: ".concat(title));
|
|
4502
|
+
return [4 /*yield*/, sdk.api.endusers.createOne({ fname: 'Autoreply', lname: "Test", email: "autoreply@tellescope.com" })];
|
|
4503
|
+
case 1:
|
|
4504
|
+
enduser = _b.sent();
|
|
4505
|
+
return [4 /*yield*/, sdk.api.endusers.set_password({ id: enduser.id, password: password })];
|
|
4506
|
+
case 2:
|
|
4507
|
+
_b.sent();
|
|
4508
|
+
return [4 /*yield*/, enduserSDK.authenticate(enduser.email, password)];
|
|
4509
|
+
case 3:
|
|
4510
|
+
_b.sent();
|
|
4511
|
+
return [4 /*yield*/, sdk.api.chat_rooms.createOne({
|
|
4512
|
+
userIds: [sdk.userInfo.id],
|
|
4513
|
+
enduserIds: [enduser.id]
|
|
4514
|
+
})];
|
|
4515
|
+
case 4:
|
|
4516
|
+
room = _b.sent();
|
|
4517
|
+
return [4 /*yield*/, sdk.api.chats.createOne({ roomId: room.id, message: 'user' })];
|
|
4518
|
+
case 5:
|
|
4519
|
+
_b.sent();
|
|
4520
|
+
return [4 /*yield*/, (0, testing_1.wait)(undefined, 50)];
|
|
4521
|
+
case 6:
|
|
4522
|
+
_b.sent();
|
|
4523
|
+
return [4 /*yield*/, (0, testing_1.async_test)('User/outbound chat does not trigger autoreply', function () { return sdk.api.chats.getSome({ filter: { roomId: room.id } }); }, { onResult: function (cs) { return cs.length === 1; } })];
|
|
4524
|
+
case 7:
|
|
4525
|
+
_b.sent();
|
|
4526
|
+
return [4 /*yield*/, enduserSDK.api.chats.createOne({ roomId: room.id, message: 'enduser' })];
|
|
4527
|
+
case 8:
|
|
4528
|
+
_b.sent();
|
|
4529
|
+
return [4 /*yield*/, (0, testing_1.wait)(undefined, 50)];
|
|
4530
|
+
case 9:
|
|
4531
|
+
_b.sent();
|
|
4532
|
+
return [4 /*yield*/, (0, testing_1.async_test)('Main test', function () { return sdk.api.chats.getSome({ filter: { roomId: room.id } }); }, { onResult: function (cs) { return (expectingAutoreply
|
|
4533
|
+
? cs.length === 3
|
|
4534
|
+
: cs.length === 2); } })];
|
|
4535
|
+
case 10:
|
|
4536
|
+
_b.sent();
|
|
4537
|
+
return [4 /*yield*/, enduserSDK.api.chats.createOne({ roomId: room.id, message: 'enduser again' })];
|
|
4538
|
+
case 11:
|
|
4539
|
+
_b.sent();
|
|
4540
|
+
return [4 /*yield*/, (0, testing_1.wait)(undefined, 50)];
|
|
4541
|
+
case 12:
|
|
4542
|
+
_b.sent();
|
|
4543
|
+
return [4 /*yield*/, (0, testing_1.async_test)("Duplicate autoreply avoided", function () { return sdk.api.chats.getSome({ filter: { roomId: room.id } }); }, { onResult: function (cs) { return (expectingAutoreply
|
|
4544
|
+
? cs.length === 4
|
|
4545
|
+
: cs.length === 3); } })
|
|
4546
|
+
// cleanup, including any availability blocks
|
|
4547
|
+
];
|
|
4548
|
+
case 13:
|
|
4549
|
+
_b.sent();
|
|
4550
|
+
return [4 /*yield*/, sdk.api.availability_blocks.getSome()];
|
|
4551
|
+
case 14:
|
|
4552
|
+
blocks = _b.sent();
|
|
4553
|
+
return [4 /*yield*/, Promise.all(__spreadArray([
|
|
4554
|
+
sdk.api.endusers.deleteOne(enduser.id),
|
|
4555
|
+
sdk.api.chat_rooms.deleteOne(room.id)
|
|
4556
|
+
], blocks.map(function (b) { return (sdk.api.availability_blocks.deleteOne(b.id)); }), true))];
|
|
4557
|
+
case 15:
|
|
4558
|
+
_b.sent();
|
|
4559
|
+
return [2 /*return*/];
|
|
4560
|
+
}
|
|
4561
|
+
});
|
|
4562
|
+
});
|
|
4563
|
+
};
|
|
4564
|
+
var auto_reply_tests = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
4565
|
+
var today, activeBlockInfo, activeWithRange, inactiveEarly, inactiveLate, inactiveOldBlockInfo, wrongDayBlockInfo, wrongEntityTypeBlockInfo, wrongEntityIdInfo, wrongTimeBlockInfo;
|
|
4566
|
+
return __generator(this, function (_a) {
|
|
4567
|
+
switch (_a.label) {
|
|
4568
|
+
case 0:
|
|
4569
|
+
(0, testing_1.log_header)("Autoreply");
|
|
4570
|
+
return [4 /*yield*/, run_autoreply_test('No availabilities', { expectingAutoreply: false })];
|
|
4571
|
+
case 1:
|
|
4572
|
+
_a.sent();
|
|
4573
|
+
today = new Date();
|
|
4574
|
+
activeBlockInfo = {
|
|
4575
|
+
dayOfWeekStartingSundayIndexedByZero: today.getDay(),
|
|
4576
|
+
startTimeInMinutes: 0,
|
|
4577
|
+
endTimeInMinutes: 60 * 24,
|
|
4578
|
+
entity: 'organization',
|
|
4579
|
+
entityId: sdk.userInfo.businessId,
|
|
4580
|
+
index: 0,
|
|
4581
|
+
};
|
|
4582
|
+
activeWithRange = __assign(__assign({}, activeBlockInfo), { active: {
|
|
4583
|
+
from: new Date(Date.now() - 1000000),
|
|
4584
|
+
to: new Date(Date.now() + 1000000),
|
|
4585
|
+
} });
|
|
4586
|
+
inactiveEarly = __assign(__assign({}, activeBlockInfo), { active: { from: new Date(Date.now() + 1000000) } });
|
|
4587
|
+
inactiveLate = __assign(__assign({}, activeBlockInfo), { active: { to: new Date(Date.now() - 1000000) } });
|
|
4588
|
+
inactiveOldBlockInfo = __assign(__assign({}, activeBlockInfo), { dayOfWeekStartingSundayIndexedByZero: (today.getDay() + 1) % 7 });
|
|
4589
|
+
wrongDayBlockInfo = __assign(__assign({}, activeBlockInfo), { dayOfWeekStartingSundayIndexedByZero: (today.getDay() + 1) % 7 });
|
|
4590
|
+
wrongEntityTypeBlockInfo = __assign(__assign({}, activeBlockInfo), { entity: 'user' });
|
|
4591
|
+
wrongEntityIdInfo = __assign(__assign({}, activeBlockInfo), { entityId: sdk.userInfo.id });
|
|
4592
|
+
wrongTimeBlockInfo = __assign(__assign({}, activeBlockInfo), { endTimeInMinutes: 0 });
|
|
4593
|
+
return [4 /*yield*/, sdk.api.organizations.updateOne(sdk.userInfo.businessId, {
|
|
4594
|
+
settings: { endusers: { autoReplyEnabled: false } }
|
|
4595
|
+
})];
|
|
4596
|
+
case 2:
|
|
4597
|
+
_a.sent();
|
|
4598
|
+
return [4 /*yield*/, sdk.api.availability_blocks.createSome([wrongTimeBlockInfo])];
|
|
4599
|
+
case 3:
|
|
4600
|
+
_a.sent();
|
|
4601
|
+
return [4 /*yield*/, run_autoreply_test('Autoreply disabled', { expectingAutoreply: false })];
|
|
4602
|
+
case 4:
|
|
4603
|
+
_a.sent();
|
|
4604
|
+
return [4 /*yield*/, sdk.api.organizations.updateOne(sdk.userInfo.businessId, {
|
|
4605
|
+
settings: { endusers: { autoReplyEnabled: true } }
|
|
4606
|
+
})];
|
|
4607
|
+
case 5:
|
|
4608
|
+
_a.sent();
|
|
4609
|
+
return [4 /*yield*/, sdk.api.availability_blocks.createSome([wrongTimeBlockInfo])];
|
|
4610
|
+
case 6:
|
|
4611
|
+
_a.sent();
|
|
4612
|
+
return [4 /*yield*/, run_autoreply_test('One bad', { expectingAutoreply: true })];
|
|
4613
|
+
case 7:
|
|
4614
|
+
_a.sent();
|
|
4615
|
+
return [4 /*yield*/, sdk.api.availability_blocks.createSome([
|
|
4616
|
+
inactiveEarly,
|
|
4617
|
+
inactiveLate,
|
|
4618
|
+
inactiveOldBlockInfo,
|
|
4619
|
+
wrongDayBlockInfo,
|
|
4620
|
+
wrongEntityIdInfo,
|
|
4621
|
+
wrongEntityTypeBlockInfo,
|
|
4622
|
+
wrongTimeBlockInfo,
|
|
4623
|
+
])];
|
|
4624
|
+
case 8:
|
|
4625
|
+
_a.sent();
|
|
4626
|
+
return [4 /*yield*/, run_autoreply_test('Multiple bad blocks', { expectingAutoreply: true })];
|
|
4627
|
+
case 9:
|
|
4628
|
+
_a.sent();
|
|
4629
|
+
return [4 /*yield*/, sdk.api.availability_blocks.createSome([activeBlockInfo])];
|
|
4630
|
+
case 10:
|
|
4631
|
+
_a.sent();
|
|
4632
|
+
return [4 /*yield*/, run_autoreply_test('One active block', { expectingAutoreply: false })];
|
|
4633
|
+
case 11:
|
|
4634
|
+
_a.sent();
|
|
4635
|
+
return [4 /*yield*/, sdk.api.availability_blocks.createSome([activeWithRange])];
|
|
4636
|
+
case 12:
|
|
4637
|
+
_a.sent();
|
|
4638
|
+
return [4 /*yield*/, run_autoreply_test('One active with range', { expectingAutoreply: false })];
|
|
4639
|
+
case 13:
|
|
4640
|
+
_a.sent();
|
|
4641
|
+
return [4 /*yield*/, sdk.api.availability_blocks.createSome([activeBlockInfo, activeWithRange, activeBlockInfo, activeWithRange])];
|
|
4642
|
+
case 14:
|
|
4643
|
+
_a.sent();
|
|
4644
|
+
return [4 /*yield*/, run_autoreply_test('Multiple active blocks', { expectingAutoreply: false })];
|
|
4645
|
+
case 15:
|
|
4646
|
+
_a.sent();
|
|
4647
|
+
return [2 /*return*/];
|
|
4648
|
+
}
|
|
4649
|
+
});
|
|
4650
|
+
}); };
|
|
4492
4651
|
var NO_TEST = function () { };
|
|
4493
4652
|
var tests = {
|
|
4653
|
+
availability_blocks: NO_TEST,
|
|
4494
4654
|
analytics_frames: NO_TEST,
|
|
4495
4655
|
automation_steps: automation_events_tests,
|
|
4496
4656
|
products: NO_TEST,
|
|
@@ -4551,7 +4711,7 @@ var tests = {
|
|
|
4551
4711
|
(0, testing_1.log_header)("API");
|
|
4552
4712
|
_k.label = 1;
|
|
4553
4713
|
case 1:
|
|
4554
|
-
_k.trys.push([1,
|
|
4714
|
+
_k.trys.push([1, 22, , 23]);
|
|
4555
4715
|
return [4 /*yield*/, Promise.all([
|
|
4556
4716
|
sdk.authenticate(email, password),
|
|
4557
4717
|
sdkSub.authenticate(subUserEmail, password),
|
|
@@ -4567,56 +4727,59 @@ var tests = {
|
|
|
4567
4727
|
return [4 /*yield*/, multi_tenant_tests()]; // should come right after setup tests
|
|
4568
4728
|
case 4:
|
|
4569
4729
|
_k.sent(); // should come right after setup tests
|
|
4570
|
-
return [4 /*yield*/,
|
|
4730
|
+
return [4 /*yield*/, auto_reply_tests()];
|
|
4571
4731
|
case 5:
|
|
4572
4732
|
_k.sent();
|
|
4573
|
-
return [4 /*yield*/,
|
|
4733
|
+
return [4 /*yield*/, sub_organization_enduser_tests()];
|
|
4574
4734
|
case 6:
|
|
4575
4735
|
_k.sent();
|
|
4576
|
-
return [4 /*yield*/, (
|
|
4736
|
+
return [4 /*yield*/, sub_organization_tests()];
|
|
4577
4737
|
case 7:
|
|
4578
4738
|
_k.sent();
|
|
4579
|
-
return [4 /*yield*/, (0, exports.
|
|
4739
|
+
return [4 /*yield*/, (0, exports.self_serve_appointment_booking_tests)()];
|
|
4580
4740
|
case 8:
|
|
4581
4741
|
_k.sent();
|
|
4582
|
-
return [4 /*yield*/,
|
|
4742
|
+
return [4 /*yield*/, (0, exports.filter_by_date_tests)()];
|
|
4583
4743
|
case 9:
|
|
4584
4744
|
_k.sent();
|
|
4585
|
-
return [4 /*yield*/,
|
|
4745
|
+
return [4 /*yield*/, generate_user_auth_tests()];
|
|
4586
4746
|
case 10:
|
|
4587
4747
|
_k.sent();
|
|
4588
|
-
return [4 /*yield*/,
|
|
4748
|
+
return [4 /*yield*/, role_based_access_tests()];
|
|
4589
4749
|
case 11:
|
|
4590
4750
|
_k.sent();
|
|
4591
|
-
return [4 /*yield*/,
|
|
4751
|
+
return [4 /*yield*/, generateEnduserAuthTests()];
|
|
4592
4752
|
case 12:
|
|
4593
4753
|
_k.sent();
|
|
4594
|
-
return [4 /*yield*/,
|
|
4754
|
+
return [4 /*yield*/, public_form_tests()];
|
|
4595
4755
|
case 13:
|
|
4596
4756
|
_k.sent();
|
|
4597
|
-
return [4 /*yield*/,
|
|
4757
|
+
return [4 /*yield*/, search_tests()];
|
|
4598
4758
|
case 14:
|
|
4599
4759
|
_k.sent();
|
|
4600
|
-
return [4 /*yield*/,
|
|
4760
|
+
return [4 /*yield*/, badInputTests()];
|
|
4601
4761
|
case 15:
|
|
4602
4762
|
_k.sent();
|
|
4603
|
-
return [4 /*yield*/,
|
|
4763
|
+
return [4 /*yield*/, filterTests()];
|
|
4604
4764
|
case 16:
|
|
4605
4765
|
_k.sent();
|
|
4606
|
-
return [4 /*yield*/,
|
|
4766
|
+
return [4 /*yield*/, updatesTests()];
|
|
4607
4767
|
case 17:
|
|
4608
4768
|
_k.sent();
|
|
4609
|
-
return [4 /*yield*/,
|
|
4769
|
+
return [4 /*yield*/, threadKeyTests()];
|
|
4610
4770
|
case 18:
|
|
4611
4771
|
_k.sent();
|
|
4612
|
-
return [4 /*yield*/,
|
|
4772
|
+
return [4 /*yield*/, enduserAccessTests()];
|
|
4613
4773
|
case 19:
|
|
4614
4774
|
_k.sent();
|
|
4615
|
-
return [4 /*yield*/,
|
|
4775
|
+
return [4 /*yield*/, enduser_session_tests()];
|
|
4616
4776
|
case 20:
|
|
4617
4777
|
_k.sent();
|
|
4618
|
-
return [
|
|
4778
|
+
return [4 /*yield*/, enduser_redaction_tests()];
|
|
4619
4779
|
case 21:
|
|
4780
|
+
_k.sent();
|
|
4781
|
+
return [3 /*break*/, 23];
|
|
4782
|
+
case 22:
|
|
4620
4783
|
err_1 = _k.sent();
|
|
4621
4784
|
console.error("Failed during custom test");
|
|
4622
4785
|
if (err_1.message && err_1.info) {
|
|
@@ -4626,18 +4789,18 @@ var tests = {
|
|
|
4626
4789
|
console.error(err_1);
|
|
4627
4790
|
}
|
|
4628
4791
|
process.exit(1);
|
|
4629
|
-
return [3 /*break*/,
|
|
4630
|
-
case
|
|
4792
|
+
return [3 /*break*/, 23];
|
|
4793
|
+
case 23:
|
|
4631
4794
|
_a = schema_1.schema;
|
|
4632
4795
|
_b = [];
|
|
4633
4796
|
for (_c in _a)
|
|
4634
4797
|
_b.push(_c);
|
|
4635
4798
|
_i = 0;
|
|
4636
|
-
_k.label =
|
|
4637
|
-
case
|
|
4638
|
-
if (!(_i < _b.length)) return [3 /*break*/,
|
|
4799
|
+
_k.label = 24;
|
|
4800
|
+
case 24:
|
|
4801
|
+
if (!(_i < _b.length)) return [3 /*break*/, 27];
|
|
4639
4802
|
_c = _b[_i];
|
|
4640
|
-
if (!(_c in _a)) return [3 /*break*/,
|
|
4803
|
+
if (!(_c in _a)) return [3 /*break*/, 26];
|
|
4641
4804
|
n = _c;
|
|
4642
4805
|
returnValidation = (_j = (_h = schema_1.schema[n].customActions) === null || _h === void 0 ? void 0 : _h.create) === null || _j === void 0 ? void 0 : _j.returns;
|
|
4643
4806
|
return [4 /*yield*/, run_generated_tests({
|
|
@@ -4648,41 +4811,41 @@ var tests = {
|
|
|
4648
4811
|
create: returnValidation // ModelFields<ClientModel>,
|
|
4649
4812
|
}
|
|
4650
4813
|
})];
|
|
4651
|
-
case 24:
|
|
4652
|
-
_k.sent();
|
|
4653
|
-
_k.label = 25;
|
|
4654
4814
|
case 25:
|
|
4655
|
-
|
|
4656
|
-
|
|
4815
|
+
_k.sent();
|
|
4816
|
+
_k.label = 26;
|
|
4657
4817
|
case 26:
|
|
4818
|
+
_i++;
|
|
4819
|
+
return [3 /*break*/, 24];
|
|
4820
|
+
case 27:
|
|
4658
4821
|
_d = tests;
|
|
4659
4822
|
_e = [];
|
|
4660
4823
|
for (_f in _d)
|
|
4661
4824
|
_e.push(_f);
|
|
4662
4825
|
_g = 0;
|
|
4663
|
-
_k.label = 27;
|
|
4664
|
-
case 27:
|
|
4665
|
-
if (!(_g < _e.length)) return [3 /*break*/, 32];
|
|
4666
|
-
_f = _e[_g];
|
|
4667
|
-
if (!(_f in _d)) return [3 /*break*/, 31];
|
|
4668
|
-
t = _f;
|
|
4669
4826
|
_k.label = 28;
|
|
4670
4827
|
case 28:
|
|
4671
|
-
|
|
4672
|
-
|
|
4828
|
+
if (!(_g < _e.length)) return [3 /*break*/, 33];
|
|
4829
|
+
_f = _e[_g];
|
|
4830
|
+
if (!(_f in _d)) return [3 /*break*/, 32];
|
|
4831
|
+
t = _f;
|
|
4832
|
+
_k.label = 29;
|
|
4673
4833
|
case 29:
|
|
4674
|
-
_k.
|
|
4675
|
-
return [
|
|
4834
|
+
_k.trys.push([29, 31, , 32]);
|
|
4835
|
+
return [4 /*yield*/, tests[t]()];
|
|
4676
4836
|
case 30:
|
|
4837
|
+
_k.sent();
|
|
4838
|
+
return [3 /*break*/, 32];
|
|
4839
|
+
case 31:
|
|
4677
4840
|
err_2 = _k.sent();
|
|
4678
4841
|
console.error("Error running test:");
|
|
4679
4842
|
console.error(err_2);
|
|
4680
4843
|
process.exit(1);
|
|
4681
|
-
return [3 /*break*/,
|
|
4682
|
-
case 31:
|
|
4683
|
-
_g++;
|
|
4684
|
-
return [3 /*break*/, 27];
|
|
4844
|
+
return [3 /*break*/, 32];
|
|
4685
4845
|
case 32:
|
|
4846
|
+
_g++;
|
|
4847
|
+
return [3 /*break*/, 28];
|
|
4848
|
+
case 33:
|
|
4686
4849
|
process.exit();
|
|
4687
4850
|
return [2 /*return*/];
|
|
4688
4851
|
}
|