Skip to content

Commit

Permalink
Type fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
rkistner committed Feb 7, 2025
1 parent c9b105d commit f2c6d79
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { LRUCache } from 'lru-cache/min';

import { storage } from '@powersync/service-core';

import { DisposableObserver, logger } from '@powersync/lib-services-framework';
import { DisposableObserver, ErrorCode, logger, ServiceError } from '@powersync/lib-services-framework';
import { v4 as uuid } from 'uuid';

import * as lib_mongo from '@powersync/lib-service-mongodb';
Expand Down
20 changes: 12 additions & 8 deletions packages/sync-rules/test/src/sync_rules.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -846,10 +846,12 @@ bucket_definitions:

expect(rules.errors).toEqual([]);

expect(rules.getStaticBucketDescriptions(normalizeTokenParameters({}))).toEqual([
{ bucket: 'highprio[]', priority: 0 },
{ bucket: 'defaultprio[]', priority: 3 }
]);
expect(rules.getBucketParameterQuerier(normalizeTokenParameters({}))).toMatchObject({
staticBuckets: [
{ bucket: 'highprio[]', priority: 0 },
{ bucket: 'defaultprio[]', priority: 3 }
]
});
});

test('priorities on bucket', () => {
Expand All @@ -869,10 +871,12 @@ bucket_definitions:

expect(rules.errors).toEqual([]);

expect(rules.getStaticBucketDescriptions(normalizeTokenParameters({}))).toEqual([
{ bucket: 'highprio[]', priority: 0 },
{ bucket: 'defaultprio[]', priority: 3 }
]);
expect(rules.getBucketParameterQuerier(normalizeTokenParameters({}))).toMatchObject({
staticBuckets: [
{ bucket: 'highprio[]', priority: 0 },
{ bucket: 'defaultprio[]', priority: 3 }
]
});
});

test(`invalid priority on bucket`, () => {
Expand Down

0 comments on commit f2c6d79

Please sign in to comment.