Skip to content

Commit af052b0

Browse files
committed
fix tests
1 parent c635e6b commit af052b0

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

packages/powersync_core/test/in_memory_sync_test.dart

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'dart:async';
2+
import 'dart:convert';
23

34
import 'package:async/async.dart';
45
import 'package:logging/logging.dart';
@@ -172,7 +173,7 @@ void _declareTests(String name, SyncOptions options) {
172173
'object_type': 'a',
173174
'object_id': '1',
174175
'checksum': 0,
175-
'data': {},
176+
'data': '{}',
176177
}
177178
],
178179
}
@@ -187,7 +188,7 @@ void _declareTests(String name, SyncOptions options) {
187188
'object_type': 'b',
188189
'object_id': '1',
189190
'checksum': 0,
190-
'data': {},
191+
'data': '{}',
191192
}
192193
],
193194
}
@@ -229,7 +230,7 @@ void _declareTests(String name, SyncOptions options) {
229230
'data': [
230231
{
231232
'checksum': priority + 10,
232-
'data': {'name': 'test', 'email': 'email'},
233+
'data': json.encode({'name': 'test', 'email': 'email'}),
233234
'op': 'PUT',
234235
'op_id': '${operationId++}',
235236
'object_id': 'prio$priority',
@@ -411,15 +412,15 @@ void _declareTests(String name, SyncOptions options) {
411412
'data': [
412413
{
413414
'checksum': 0,
414-
'data': {'name': 'from local', 'email': '[email protected]'},
415+
'data': json.encode({'name': 'from local', 'email': '[email protected]'}),
415416
'op': 'PUT',
416417
'op_id': '1',
417418
'object_id': '1',
418419
'object_type': 'customers'
419420
},
420421
{
421422
'checksum': 0,
422-
'data': {'name': 'additional', 'email': ''},
423+
'data': json.encode({'name': 'additional', 'email': ''}),
423424
'op': 'PUT',
424425
'op_id': '2',
425426
'object_id': '2',
@@ -477,7 +478,7 @@ void _declareTests(String name, SyncOptions options) {
477478
'object_type': bucket,
478479
'object_id': '$lastOpId',
479480
'checksum': 0,
480-
'data': {},
481+
'data': '{}',
481482
}
482483
],
483484
}

packages/powersync_core/test/utils/abstract_test_utils.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ extension MockSync on PowerSyncDatabase {
153153
}) {
154154
final impl = StreamingSyncImplementation(
155155
adapter: BucketStorage(this),
156-
schema: null,
156+
schema: schema,
157157
client: client,
158158
options: ResolvedSyncOptions(options),
159159
connector: InternalConnector.wrap(connector, this),

0 commit comments

Comments
 (0)