1127
1127
},
1128
1128
{
1129
1129
"category": "prod",
1130
-
"description": "should throw an error when calculating the prod of an empty array",
1130
+
"description": "should return null when calculating the prod of an empty array",
1131
1131
"tests": [
1132
1132
{
1133
1133
"input": [],
1134
1134
"query": ["prod"],
1135
-
"throws": "Non-empty array expected"
1135
+
"output": null
1136
1136
}
1137
1137
]
1138
1138
},
1157
1157
},
1158
1158
{
1159
1159
"category": "average",
1160
-
"description": "should throw an error when calculating the average of an empty array",
1160
+
"description": "should return null when calculating the average of an empty array",
1161
1161
"tests": [
1162
1162
{
1163
1163
"input": [],
1164
1164
"query": ["average"],
1165
-
"throws": "Non-empty array expected"
1165
+
"output": null
1166
1166
}
1167
1167
]
1168
1168
},
1169
1169
{
1170
1170
"category": "average",
1171
-
"description": "should throw an error when calculating the average a string",
1171
+
"description": "should throw an error when calculating the average of a string",
1172
1172
"tests": [
1173
1173
{
1174
1174
"input": "abc",
1331
1331
},
1332
1332
{
1333
1333
"category": "gt",
1334
-
"description": "should throw when calculating greater than with mixed data types",
1335
-
"tests": [
1336
-
{
1337
-
"input": null,
1338
-
"query": ["gt", "3", 2],
1339
-
"throws": "Two numbers, strings, or booleans expected"
1340
-
}
1341
-
]
1334
+
"description": "should return false when calculating greater than with mixed data types",
1335
+
"tests": [{ "input": null, "query": ["gt", "3", 2], "output": false }]
1342
1336
},
1343
1337
{
1344
1338
"category": "gt",
1345
-
"description": "should throw when calculating greater than with an unsupported data type",
1339
+
"description": "should return false when calculating greater than with an unsupported data type",
1346
1340
"tests": [
1347
-
{
1348
-
"input": null,
1349
-
"query": ["gt", 2, ["array", 1, 2, 3]],
1350
-
"throws": "Two numbers, strings, or booleans expected"
1351
-
},
1352
-
{
1353
-
"input": null,
1354
-
"query": ["gt", ["array", 1, 2, 4], ["array", 1, 2, 3]],
1355
-
"throws": "Two numbers, strings, or booleans expected"
1356
-
},
1357
-
{
1358
-
"input": null,
1359
-
"query": ["gt", 2, ["object", { "a": 1 }]],
1360
-
"throws": "Two numbers, strings, or booleans expected"
1361
-
}
1341
+
{ "input": null, "query": ["gt", 2, ["array", 1, 2, 3]], "output": false },
1342
+
{ "input": null, "query": ["gt", ["array", 1, 2, 4], ["array", 1, 2, 3]], "output": false },
1343
+
{ "input": null, "query": ["gt", 2, ["object", { "a": 1 }]], "output": false }
1362
1344
]
1363
1345
},
1364
1346
{
1406
1388
},
1407
1389
{
1408
1390
"category": "gte",
1409
-
"description": "should throw when calculating greater than or equal to with mixed data types",
1410
-
"tests": [
1411
-
{
1412
-
"input": null,
1413
-
"query": ["gte", "3", 2],
1414
-
"throws": "Two numbers, strings, or booleans expected"
1415
-
}
1416
-
]
1391
+
"description": "should return false when calculating greater than or equal to with mixed data types",
1392
+
"tests": [{ "input": null, "query": ["gte", "3", 2], "output": false }]
1417
1393
},
1418
1394
{
1419
1395
"category": "gte",
1420
-
"description": "should throw when calculating greater than or equal to with an unsupported data type",
1396
+
"description": "should return false when calculating greater than or equal to with an unsupported data type",
1421
1397
"tests": [
1422
-
{
1423
-
"input": null,
1424
-
"query": ["gte", 2, ["array", 1, 2, 3]],
1425
-
"throws": "Two numbers, strings, or booleans expected"
1426
-
},
1398
+
{ "input": null, "query": ["gte", 2, ["array", 1, 2, 3]], "output": false },
1427
1399
{
1428
1400
"input": null,
1429
1401
"query": ["gte", ["array", 1, 2, 4], ["array", 1, 2, 3]],
1430
-
"throws": "Two numbers, strings, or booleans expected"
1402
+
"output": false
1431
1403
},
1432
-
{
1433
-
"input": null,
1434
-
"query": ["gte", 2, ["object", { "a": 1 }]],
1435
-
"throws": "Two numbers, strings, or booleans expected"
1436
-
}
1404
+
{ "input": null, "query": ["gte", 2, ["object", { "a": 1 }]], "output": false }
1437
1405
]
1438
1406
},
1439
1407
{
1481
1449
},
1482
1450
{
1483
1451
"category": "lt",
1484
-
"description": "should throw when calculating less than with mixed data types",
1485
-
"tests": [
1486
-
{
1487
-
"input": null,
1488
-
"query": ["lt", 2, "3"],
1489
-
"throws": "Two numbers, strings, or booleans expected"
1490
-
}
1491
-
]
1452
+
"description": "should return false when calculating less than with mixed data types",
1453
+
"tests": [{ "input": null, "query": ["lt", 2, "3"], "output": false }]
1492
1454
},
1493
1455
{
1494
1456
"category": "lt",
1495
-
"description": "should throw when calculating less than with an unsupported data type",
1457
+
"description": "should return false when calculating less than with an unsupported data type",
1496
1458
"tests": [
1497
-
{
1498
-
"input": null,
1499
-
"query": ["lt", 2, ["array", 1, 2, 3]],
1500
-
"throws": "Two numbers, strings, or booleans expected"
1501
-
},
1502
-
{
1503
-
"input": null,
1504
-
"query": ["lt", ["array", 1, 2, 4], ["array", 1, 2, 3]],
1505
-
"throws": "Two numbers, strings, or booleans expected"
1506
-
},
1507
-
{
1508
-
"input": null,
1509
-
"query": ["lt", 2, ["object", { "a": 1 }]],
1510
-
"throws": "Two numbers, strings, or booleans expected"
1511
-
}
1459
+
{ "input": null, "query": ["lt", 2, ["array", 1, 2, 3]], "output": false },
1460
+
{ "input": null, "query": ["lt", ["array", 1, 2, 4], ["array", 1, 2, 3]], "output": false },
1461
+
{ "input": null, "query": ["lt", 2, ["object", { "a": 1 }]], "output": false }
1512
1462
]
1513
1463
},
1514
1464
{
1560
1510
},
1561
1511
{
1562
1512
"category": "lte",
1563
-
"description": "should throw when calculating less than or equal to with mixed data types",
1564
-
"tests": [
1565
-
{
1566
-
"input": null,
1567
-
"query": ["lte", "3", 2],
1568
-
"throws": "Two numbers, strings, or booleans expected"
1569
-
}
1570
-
]
1513
+
"description": "should return false when calculating less than or equal to with mixed data types",
1514
+
"tests": [{ "input": null, "query": ["lte", "3", 2], "output": false }]
1571
1515
},
1572
1516
{
1573
1517
"category": "lte",
1574
-
"description": "should throw when calculating less than or equal to with an unsupported data type",
1518
+
"description": "should return false when calculating less than or equal to with an unsupported data type",
1575
1519
"tests": [
1576
-
{
1577
-
"input": null,
1578
-
"query": ["lte", 2, ["array", 1, 2, 3]],
1579
-
"throws": "Two numbers, strings, or booleans expected"
1580
-
},
1520
+
{ "input": null, "query": ["lte", 2, ["array", 1, 2, 3]], "output": false },
1581
1521
{
1582
1522
"input": null,
1583
1523
"query": ["lte", ["array", 1, 2, 4], ["array", 1, 2, 3]],
1584
-
"throws": "Two numbers, strings, or booleans expected"
1524
+
"output": false
1585
1525
},
1586
-
{
1587
-
"input": null,
1588
-
"query": ["lte", 2, ["object", { "a": 1 }]],
1589
-
"throws": "Two numbers, strings, or booleans expected"
1590
-
}
1526
+
{ "input": null, "query": ["lte", 2, ["object", { "a": 1 }]], "output": false }
1591
1527
]
1592
1528
},
1593
1529
{
1750
1686
},
1751
1687
{
1752
1688
"category": "and",
1753
-
"description": "should throw when calculating and with no arguments",
1689
+
"description": "should return null calculating and with no arguments",
1754
1690
"tests": [
1755
1691
{
1756
1692
"input": null,
1757
1693
"query": ["and"],
1758
-
"throws": "Non-empty array expected"
1694
+
"output": null
1759
1695
}
1760
1696
]
1761
1697
},
1821
1757
},
1822
1758
{
1823
1759
"category": "or",
1824
-
"description": "should throw when calculating or with no arguments",
1760
+
"description": "should return null when calculating or with no arguments",
1825
1761
"tests": [
1826
1762
{
1827
1763
"input": null,
1828
1764
"query": ["or"],
1829
-
"throws": "Non-empty array expected"
1765
+
"output": null
1830
1766
}
1831
1767
]
1832
1768
},
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4