@roc-db/test-utils 0.2.0-pre.42 → 0.2.0-pre.43
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/dist/index.js +12 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -766,7 +766,7 @@ var testAdapterImplementation = async (adapterConstructor, generateArgs) => {
|
|
|
766
766
|
const optimisticAdapter = await createAdapter({ optimistic: true });
|
|
767
767
|
expect2(persistedAdapter.persistOptimisticMutations).toBeDefined();
|
|
768
768
|
expect2(optimisticAdapter.loadMutations).toBeDefined();
|
|
769
|
-
const [, createPostMutation] = await optimisticAdapter.createPost({
|
|
769
|
+
const [post2, createPostMutation] = await optimisticAdapter.createPost({
|
|
770
770
|
title: "Foo",
|
|
771
771
|
tags: []
|
|
772
772
|
});
|
|
@@ -776,6 +776,17 @@ var testAdapterImplementation = async (adapterConstructor, generateArgs) => {
|
|
|
776
776
|
expect2(persistCratePostMutation.persistedAt >= createPostMutation.timestamp).toBeTrue();
|
|
777
777
|
const readMutation2 = await persistedAdapter.readMutation(persistCratePostMutation.ref);
|
|
778
778
|
expect2(readMutation2).toStrictEqual(persistCratePostMutation);
|
|
779
|
+
const [draft2, createDraftMutation] = await optimisticAdapter.createDraft({
|
|
780
|
+
postRef: post2.ref
|
|
781
|
+
});
|
|
782
|
+
const [{ persistedAt, ...persistedCreateDraftMutation }] = await persistedAdapter.persistOptimisticMutations([
|
|
783
|
+
createDraftMutation
|
|
784
|
+
]);
|
|
785
|
+
expect2(persistedCreateDraftMutation).toStrictEqual(createDraftMutation);
|
|
786
|
+
const changeSetAdapter2 = optimisticAdapter.changeSet(draft2.ref);
|
|
787
|
+
const [res] = await changeSetAdapter2.createBlockParagraph({
|
|
788
|
+
parentRef: post2.ref
|
|
789
|
+
});
|
|
779
790
|
});
|
|
780
791
|
});
|
|
781
792
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roc-db/test-utils",
|
|
3
|
-
"version": "0.2.0-pre.
|
|
3
|
+
"version": "0.2.0-pre.43",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
],
|
|
18
18
|
"sideEffects": false,
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"roc-db": "0.2.0-pre.
|
|
20
|
+
"roc-db": "0.2.0-pre.43",
|
|
21
21
|
"zod": "3.24.2"
|
|
22
22
|
},
|
|
23
23
|
"keywords": [],
|