Skip to content

Option to use core exension for sync logic #283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jun 19, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
send data as a JSON String to fix tests
  • Loading branch information
davidmartos96 authored and simolus3 committed Jun 12, 2025
commit 65d93d67fcab48b216aef90dacce05d2eae98e7c
13 changes: 7 additions & 6 deletions packages/powersync_core/test/in_memory_sync_test.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:async';
import 'dart:convert';

import 'package:async/async.dart';
import 'package:logging/logging.dart';
Expand Down Expand Up @@ -176,7 +177,7 @@ void _declareTests(String name, SyncOptions options) {
'object_type': 'a',
'object_id': '1',
'checksum': 0,
'data': {},
'data': '{}',
}
],
}
Expand All @@ -191,7 +192,7 @@ void _declareTests(String name, SyncOptions options) {
'object_type': 'b',
'object_id': '1',
'checksum': 0,
'data': {},
'data': '{}',
}
],
}
Expand Down Expand Up @@ -233,7 +234,7 @@ void _declareTests(String name, SyncOptions options) {
'data': [
{
'checksum': priority + 10,
'data': {'name': 'test', 'email': 'email'},
'data': json.encode({'name': 'test', 'email': 'email'}),
'op': 'PUT',
'op_id': '${operationId++}',
'object_id': 'prio$priority',
Expand Down Expand Up @@ -415,15 +416,15 @@ void _declareTests(String name, SyncOptions options) {
'data': [
{
'checksum': 0,
'data': {'name': 'from local', 'email': 'local@example.org'},
'data': json.encode({'name': 'from local', 'email': 'local@example.org'}),
'op': 'PUT',
'op_id': '1',
'object_id': '1',
'object_type': 'customers'
},
{
'checksum': 0,
'data': {'name': 'additional', 'email': ''},
'data': json.encode({'name': 'additional', 'email': ''}),
'op': 'PUT',
'op_id': '2',
'object_id': '2',
Expand Down Expand Up @@ -481,7 +482,7 @@ void _declareTests(String name, SyncOptions options) {
'object_type': bucket,
'object_id': '$lastOpId',
'checksum': 0,
'data': {},
'data': '{}',
}
],
}
Expand Down