overtime-live-trading-utils 2.1.39 → 2.1.41
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/main.js +1 -1
- package/package.json +1 -1
- package/src/tests/unit/resolution.test.ts +8 -7
- package/src/types/resolution.ts +576 -26
- package/src/utils/resolution.ts +1 -0
package/package.json
CHANGED
|
@@ -1319,13 +1319,13 @@ describe('Resolution Utils', () => {
|
|
|
1319
1319
|
).toBe(true);
|
|
1320
1320
|
});
|
|
1321
1321
|
|
|
1322
|
-
it('Should resolve overtime period typeId (10025)', () => {
|
|
1322
|
+
it('Should NOT resolve overtime period typeId (10025) - overtime has no specific markets', () => {
|
|
1323
1323
|
const result = canResolveMarketsForEvent(
|
|
1324
1324
|
MockNFLCompletedWithOvertime,
|
|
1325
1325
|
10025,
|
|
1326
1326
|
SportPeriodType.QUARTERS_BASED
|
|
1327
1327
|
);
|
|
1328
|
-
expect(result).toBe(
|
|
1328
|
+
expect(result).toBe(false);
|
|
1329
1329
|
});
|
|
1330
1330
|
|
|
1331
1331
|
it('Should resolve full game typeIds for completed overtime game', () => {
|
|
@@ -1337,7 +1337,7 @@ describe('Resolution Utils', () => {
|
|
|
1337
1337
|
).toBe(true);
|
|
1338
1338
|
});
|
|
1339
1339
|
|
|
1340
|
-
it('Should return all resolvable typeIds
|
|
1340
|
+
it('Should return all resolvable typeIds excluding overtime in batch check', () => {
|
|
1341
1341
|
const typeIds = [10021, 10022, 10023, 10024, 10025, 10001];
|
|
1342
1342
|
const result = filterMarketsThatCanBeResolved(
|
|
1343
1343
|
MockNFLCompletedWithOvertime,
|
|
@@ -1345,7 +1345,8 @@ describe('Resolution Utils', () => {
|
|
|
1345
1345
|
SportPeriodType.QUARTERS_BASED
|
|
1346
1346
|
);
|
|
1347
1347
|
|
|
1348
|
-
|
|
1348
|
+
// 10025 (overtime) should not be included as period 5 has no specific markets
|
|
1349
|
+
expect(result).toEqual([10021, 10022, 10023, 10024, 10001]);
|
|
1349
1350
|
});
|
|
1350
1351
|
|
|
1351
1352
|
it('Should return false for 8th period typeId (period did not occur)', () => {
|
|
@@ -1367,15 +1368,15 @@ describe('Resolution Utils', () => {
|
|
|
1367
1368
|
});
|
|
1368
1369
|
|
|
1369
1370
|
it('Should not include non-existent periods in batch check', () => {
|
|
1370
|
-
const typeIds = [10021, 10022, 10025, 10028, 10029];
|
|
1371
|
+
const typeIds = [10021, 10022, 10023, 10024, 10025, 10028, 10029];
|
|
1371
1372
|
const result = filterMarketsThatCanBeResolved(
|
|
1372
1373
|
MockNFLCompletedWithOvertime,
|
|
1373
1374
|
typeIds,
|
|
1374
1375
|
SportPeriodType.QUARTERS_BASED
|
|
1375
1376
|
);
|
|
1376
1377
|
|
|
1377
|
-
//
|
|
1378
|
-
expect(result).toEqual([10021, 10022,
|
|
1378
|
+
// Periods 1-4 are resolvable; period 5 (overtime) has no markets; periods 8-9 did not occur
|
|
1379
|
+
expect(result).toEqual([10021, 10022, 10023, 10024]);
|
|
1379
1380
|
});
|
|
1380
1381
|
});
|
|
1381
1382
|
|