jazz-tools 0.8.15 → 0.8.17
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +283 -269
- package/dist/native/coValues/account.js +3 -6
- package/dist/native/coValues/account.js.map +1 -1
- package/dist/native/coValues/coList.js +3 -7
- package/dist/native/coValues/coList.js.map +1 -1
- package/dist/native/coValues/coMap.js +8 -14
- package/dist/native/coValues/coMap.js.map +1 -1
- package/dist/native/coValues/coStream.js +7 -12
- package/dist/native/coValues/coStream.js.map +1 -1
- package/dist/native/coValues/deepLoading.js +6 -3
- package/dist/native/coValues/deepLoading.js.map +1 -1
- package/dist/native/coValues/extensions/imageDef.js.map +1 -1
- package/dist/native/coValues/group.js +3 -6
- package/dist/native/coValues/group.js.map +1 -1
- package/dist/native/coValues/interfaces.js +4 -3
- package/dist/native/coValues/interfaces.js.map +1 -1
- package/dist/native/exports.js +3 -9
- package/dist/native/exports.js.map +1 -1
- package/dist/native/implementation/createContext.js +1 -2
- package/dist/native/implementation/createContext.js.map +1 -1
- package/dist/native/implementation/devtoolsFormatters.js +5 -25
- package/dist/native/implementation/devtoolsFormatters.js.map +1 -1
- package/dist/native/implementation/refs.js +1 -2
- package/dist/native/implementation/refs.js.map +1 -1
- package/dist/native/implementation/schema.js +1 -1
- package/dist/native/implementation/schema.js.map +1 -1
- package/dist/native/implementation/subscriptionScope.js +2 -4
- package/dist/native/implementation/subscriptionScope.js.map +1 -1
- package/dist/native/index.native.js +1 -1
- package/dist/native/index.native.js.map +1 -1
- package/dist/native/lib/cache.js.map +1 -1
- package/dist/native/lib/cache.test.js +1 -1
- package/dist/native/lib/cache.test.js.map +1 -1
- package/dist/web/coValues/account.js +3 -6
- package/dist/web/coValues/account.js.map +1 -1
- package/dist/web/coValues/coList.js +3 -7
- package/dist/web/coValues/coList.js.map +1 -1
- package/dist/web/coValues/coMap.js +8 -14
- package/dist/web/coValues/coMap.js.map +1 -1
- package/dist/web/coValues/coStream.js +7 -12
- package/dist/web/coValues/coStream.js.map +1 -1
- package/dist/web/coValues/deepLoading.js +6 -3
- package/dist/web/coValues/deepLoading.js.map +1 -1
- package/dist/web/coValues/extensions/imageDef.js.map +1 -1
- package/dist/web/coValues/group.js +3 -6
- package/dist/web/coValues/group.js.map +1 -1
- package/dist/web/coValues/interfaces.js +4 -3
- package/dist/web/coValues/interfaces.js.map +1 -1
- package/dist/web/exports.js +3 -9
- package/dist/web/exports.js.map +1 -1
- package/dist/web/implementation/createContext.js +1 -2
- package/dist/web/implementation/createContext.js.map +1 -1
- package/dist/web/implementation/devtoolsFormatters.js +5 -25
- package/dist/web/implementation/devtoolsFormatters.js.map +1 -1
- package/dist/web/implementation/refs.js +1 -2
- package/dist/web/implementation/refs.js.map +1 -1
- package/dist/web/implementation/schema.js +1 -1
- package/dist/web/implementation/schema.js.map +1 -1
- package/dist/web/implementation/subscriptionScope.js +2 -4
- package/dist/web/implementation/subscriptionScope.js.map +1 -1
- package/dist/web/lib/cache.js.map +1 -1
- package/dist/web/lib/cache.test.js +1 -1
- package/dist/web/lib/cache.test.js.map +1 -1
- package/package.json +5 -9
- package/src/coValues/account.ts +330 -339
- package/src/coValues/coList.ts +474 -495
- package/src/coValues/coMap.ts +584 -604
- package/src/coValues/coStream.ts +624 -650
- package/src/coValues/deepLoading.ts +184 -200
- package/src/coValues/extensions/imageDef.ts +44 -44
- package/src/coValues/group.ts +196 -210
- package/src/coValues/interfaces.ts +197 -199
- package/src/exports.ts +38 -26
- package/src/implementation/createContext.ts +206 -213
- package/src/implementation/devtoolsFormatters.ts +80 -100
- package/src/implementation/refs.ts +127 -139
- package/src/implementation/schema.ts +124 -128
- package/src/implementation/subscriptionScope.ts +111 -121
- package/src/index.native.ts +3 -3
- package/src/lib/cache.test.ts +48 -48
- package/src/lib/cache.ts +9 -9
- package/src/tests/coList.test.ts +264 -283
- package/src/tests/coMap.test.ts +741 -761
- package/src/tests/coStream.test.ts +405 -438
- package/src/tests/deepLoading.test.ts +251 -256
- package/src/tests/groupsAndAccounts.test.ts +70 -74
- package/src/tests/schema.test.ts +198 -198
- package/src/tests/subscribe.test.ts +312 -299
- package/tsconfig.json +2 -4
- package/tsconfig.native.json +4 -10
- package/tsconfig.web.json +4 -10
- package/.eslintrc.cjs +0 -24
- package/.prettierrc.js +0 -9
@@ -1,311 +1,306 @@
|
|
1
1
|
const Crypto = await WasmCrypto.create();
|
2
|
-
import { expect, describe, test, expectTypeOf } from "vitest";
|
3
2
|
import { connectedPeers } from "cojson/src/streamUtils.ts";
|
3
|
+
import { describe, expect, expectTypeOf, test } from "vitest";
|
4
4
|
import {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
5
|
+
Account,
|
6
|
+
CoList,
|
7
|
+
CoMap,
|
8
|
+
CoStream,
|
9
|
+
ID,
|
10
|
+
Profile,
|
11
|
+
SessionID,
|
12
|
+
WasmCrypto,
|
13
|
+
co,
|
14
|
+
createJazzContext,
|
15
|
+
fixedCredentialsAuth,
|
16
|
+
isControlledAccount,
|
17
17
|
} from "../index.web.js";
|
18
18
|
import { randomSessionProvider } from "../internal.js";
|
19
19
|
|
20
20
|
class TestMap extends CoMap {
|
21
|
-
|
22
|
-
|
21
|
+
list = co.ref(TestList);
|
22
|
+
optionalRef = co.ref(InnermostMap, { optional: true });
|
23
23
|
}
|
24
24
|
|
25
25
|
class TestList extends CoList.Of(co.ref(() => InnerMap)) {}
|
26
26
|
|
27
27
|
class InnerMap extends CoMap {
|
28
|
-
|
28
|
+
stream = co.ref(TestStream);
|
29
29
|
}
|
30
30
|
|
31
31
|
class TestStream extends CoStream.Of(co.ref(() => InnermostMap)) {}
|
32
32
|
|
33
33
|
class InnermostMap extends CoMap {
|
34
|
-
|
34
|
+
value = co.string;
|
35
35
|
}
|
36
36
|
|
37
37
|
describe("Deep loading with depth arg", async () => {
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
38
|
+
const me = await Account.create({
|
39
|
+
creationProps: { name: "Hermes Puggington" },
|
40
|
+
crypto: Crypto,
|
41
|
+
});
|
42
42
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
43
|
+
const [initialAsPeer, secondPeer] = connectedPeers("initial", "second", {
|
44
|
+
peer1role: "server",
|
45
|
+
peer2role: "client",
|
46
|
+
});
|
47
47
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
48
|
+
if (!isControlledAccount(me)) {
|
49
|
+
throw "me is not a controlled account";
|
50
|
+
}
|
51
|
+
me._raw.core.node.syncManager.addPeer(secondPeer);
|
52
|
+
const { account: meOnSecondPeer } = await createJazzContext({
|
53
|
+
auth: fixedCredentialsAuth({
|
54
|
+
accountID: me.id,
|
55
|
+
secret: me._raw.agentSecret,
|
56
|
+
}),
|
57
|
+
sessionProvider: randomSessionProvider,
|
58
|
+
peersToLoadFrom: [initialAsPeer],
|
59
|
+
crypto: Crypto,
|
60
|
+
});
|
61
61
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
{ value: "hello" },
|
74
|
-
ownership,
|
75
|
-
),
|
76
|
-
],
|
77
|
-
ownership,
|
78
|
-
),
|
79
|
-
},
|
80
|
-
ownership,
|
81
|
-
),
|
82
|
-
],
|
83
|
-
ownership,
|
62
|
+
test("loading a deeply nested object will wait until all required refs are loaded", async () => {
|
63
|
+
const ownership = { owner: me };
|
64
|
+
const map = TestMap.create(
|
65
|
+
{
|
66
|
+
list: TestList.create(
|
67
|
+
[
|
68
|
+
InnerMap.create(
|
69
|
+
{
|
70
|
+
stream: TestStream.create(
|
71
|
+
[InnermostMap.create({ value: "hello" }, ownership)],
|
72
|
+
ownership,
|
84
73
|
),
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
expect(map1.list).toBe(null);
|
74
|
+
},
|
75
|
+
ownership,
|
76
|
+
),
|
77
|
+
],
|
78
|
+
ownership,
|
79
|
+
),
|
80
|
+
},
|
81
|
+
ownership,
|
82
|
+
);
|
95
83
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
>();
|
103
|
-
if (map2 === undefined) {
|
104
|
-
throw new Error("map2 is undefined");
|
105
|
-
}
|
106
|
-
expect(map2.list).not.toBe(null);
|
107
|
-
expect(map2.list[0]).toBe(null);
|
84
|
+
const map1 = await TestMap.load(map.id, meOnSecondPeer, {});
|
85
|
+
expectTypeOf(map1).toEqualTypeOf<TestMap | undefined>();
|
86
|
+
if (map1 === undefined) {
|
87
|
+
throw new Error("map1 is undefined");
|
88
|
+
}
|
89
|
+
expect(map1.list).toBe(null);
|
108
90
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
91
|
+
const map2 = await TestMap.load(map.id, meOnSecondPeer, { list: [] });
|
92
|
+
expectTypeOf(map2).toEqualTypeOf<
|
93
|
+
| (TestMap & {
|
94
|
+
list: TestList;
|
95
|
+
})
|
96
|
+
| undefined
|
97
|
+
>();
|
98
|
+
if (map2 === undefined) {
|
99
|
+
throw new Error("map2 is undefined");
|
100
|
+
}
|
101
|
+
expect(map2.list).not.toBe(null);
|
102
|
+
expect(map2.list[0]).toBe(null);
|
121
103
|
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
104
|
+
const map3 = await TestMap.load(map.id, meOnSecondPeer, { list: [{}] });
|
105
|
+
expectTypeOf(map3).toEqualTypeOf<
|
106
|
+
| (TestMap & {
|
107
|
+
list: TestList & InnerMap[];
|
108
|
+
})
|
109
|
+
| undefined
|
110
|
+
>();
|
111
|
+
if (map3 === undefined) {
|
112
|
+
throw new Error("map3 is undefined");
|
113
|
+
}
|
114
|
+
expect(map3.list[0]).not.toBe(null);
|
115
|
+
expect(map3.list[0]?.stream).toBe(null);
|
131
116
|
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
if (map4 === undefined) {
|
142
|
-
throw new Error("map4 is undefined");
|
143
|
-
}
|
144
|
-
expect(map4.list[0]?.stream).not.toBe(null);
|
145
|
-
expect(map4.list[0]?.stream?.[me.id]).not.toBe(null);
|
146
|
-
expect(map4.list[0]?.stream?.byMe?.value).toBe(null);
|
117
|
+
const map3a = await TestMap.load(map.id, meOnSecondPeer, {
|
118
|
+
optionalRef: {},
|
119
|
+
});
|
120
|
+
expectTypeOf(map3a).toEqualTypeOf<
|
121
|
+
| (TestMap & {
|
122
|
+
optionalRef: InnermostMap | undefined;
|
123
|
+
})
|
124
|
+
| undefined
|
125
|
+
>();
|
147
126
|
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
} & {
|
164
|
-
[key: ID<Account>]: { value: InnermostMap };
|
165
|
-
};
|
166
|
-
})[];
|
167
|
-
})
|
168
|
-
| undefined;
|
127
|
+
const map4 = await TestMap.load(map.id, meOnSecondPeer, {
|
128
|
+
list: [{ stream: [] }],
|
129
|
+
});
|
130
|
+
expectTypeOf(map4).toEqualTypeOf<
|
131
|
+
| (TestMap & {
|
132
|
+
list: TestList & (InnerMap & { stream: TestStream })[];
|
133
|
+
})
|
134
|
+
| undefined
|
135
|
+
>();
|
136
|
+
if (map4 === undefined) {
|
137
|
+
throw new Error("map4 is undefined");
|
138
|
+
}
|
139
|
+
expect(map4.list[0]?.stream).not.toBe(null);
|
140
|
+
expect(map4.list[0]?.stream?.[me.id]).not.toBe(null);
|
141
|
+
expect(map4.list[0]?.stream?.byMe?.value).toBe(null);
|
169
142
|
|
170
|
-
|
171
|
-
|
172
|
-
throw new Error("map5 is undefined");
|
173
|
-
}
|
174
|
-
expect(map5.list[0]?.stream?.[me.id]?.value).not.toBe(null);
|
175
|
-
expect(map5.list[0]?.stream?.byMe?.value).not.toBe(null);
|
143
|
+
const map5 = await TestMap.load(map.id, meOnSecondPeer, {
|
144
|
+
list: [{ stream: [{}] }],
|
176
145
|
});
|
146
|
+
type ExpectedMap5 =
|
147
|
+
| (TestMap & {
|
148
|
+
list: TestList &
|
149
|
+
(InnerMap & {
|
150
|
+
stream: TestStream & {
|
151
|
+
byMe?: { value: InnermostMap };
|
152
|
+
inCurrentSession?: { value: InnermostMap };
|
153
|
+
perSession: {
|
154
|
+
[sessionID: SessionID]: {
|
155
|
+
value: InnermostMap;
|
156
|
+
};
|
157
|
+
};
|
158
|
+
} & {
|
159
|
+
[key: ID<Account>]: { value: InnermostMap };
|
160
|
+
};
|
161
|
+
})[];
|
162
|
+
})
|
163
|
+
| undefined;
|
164
|
+
|
165
|
+
expectTypeOf(map5).toEqualTypeOf<ExpectedMap5>();
|
166
|
+
if (map5 === undefined) {
|
167
|
+
throw new Error("map5 is undefined");
|
168
|
+
}
|
169
|
+
expect(map5.list[0]?.stream?.[me.id]?.value).not.toBe(null);
|
170
|
+
expect(map5.list[0]?.stream?.byMe?.value).not.toBe(null);
|
171
|
+
});
|
177
172
|
});
|
178
173
|
|
179
174
|
class CustomProfile extends Profile {
|
180
|
-
|
175
|
+
stream = co.ref(TestStream);
|
181
176
|
}
|
182
177
|
|
183
178
|
class CustomAccount extends Account {
|
184
|
-
|
185
|
-
|
179
|
+
profile = co.ref(CustomProfile);
|
180
|
+
root = co.ref(TestMap);
|
186
181
|
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
}
|
204
|
-
|
205
|
-
const thisLoaded = await this.ensureLoaded({
|
206
|
-
profile: { stream: [] },
|
207
|
-
root: { list: [] },
|
208
|
-
});
|
209
|
-
expectTypeOf(thisLoaded).toEqualTypeOf<
|
210
|
-
| (CustomAccount & {
|
211
|
-
profile: CustomProfile & {
|
212
|
-
stream: TestStream;
|
213
|
-
};
|
214
|
-
root: TestMap & {
|
215
|
-
list: TestList;
|
216
|
-
};
|
217
|
-
})
|
218
|
-
| undefined
|
219
|
-
>();
|
182
|
+
async migrate(
|
183
|
+
this: CustomAccount,
|
184
|
+
creationProps?: { name: string } | undefined,
|
185
|
+
) {
|
186
|
+
if (creationProps) {
|
187
|
+
this.profile = CustomProfile.create(
|
188
|
+
{
|
189
|
+
name: creationProps.name,
|
190
|
+
stream: TestStream.create([], { owner: this }),
|
191
|
+
},
|
192
|
+
{ owner: this },
|
193
|
+
);
|
194
|
+
this.root = TestMap.create(
|
195
|
+
{ list: TestList.create([], { owner: this }) },
|
196
|
+
{ owner: this },
|
197
|
+
);
|
220
198
|
}
|
199
|
+
|
200
|
+
const thisLoaded = await this.ensureLoaded({
|
201
|
+
profile: { stream: [] },
|
202
|
+
root: { list: [] },
|
203
|
+
});
|
204
|
+
expectTypeOf(thisLoaded).toEqualTypeOf<
|
205
|
+
| (CustomAccount & {
|
206
|
+
profile: CustomProfile & {
|
207
|
+
stream: TestStream;
|
208
|
+
};
|
209
|
+
root: TestMap & {
|
210
|
+
list: TestList;
|
211
|
+
};
|
212
|
+
})
|
213
|
+
| undefined
|
214
|
+
>();
|
215
|
+
}
|
221
216
|
}
|
222
217
|
|
223
218
|
test("Deep loading within account", async () => {
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
219
|
+
const me = await CustomAccount.create({
|
220
|
+
creationProps: { name: "Hermes Puggington" },
|
221
|
+
crypto: Crypto,
|
222
|
+
});
|
228
223
|
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
224
|
+
const meLoaded = await me.ensureLoaded({
|
225
|
+
profile: { stream: [] },
|
226
|
+
root: { list: [] },
|
227
|
+
});
|
228
|
+
expectTypeOf(meLoaded).toEqualTypeOf<
|
229
|
+
| (CustomAccount & {
|
230
|
+
profile: CustomProfile & {
|
231
|
+
stream: TestStream;
|
232
|
+
};
|
233
|
+
root: TestMap & {
|
234
|
+
list: TestList;
|
235
|
+
};
|
236
|
+
})
|
237
|
+
| undefined
|
238
|
+
>();
|
239
|
+
if (meLoaded === undefined) {
|
240
|
+
throw new Error("meLoaded is undefined");
|
241
|
+
}
|
242
|
+
expect(meLoaded.profile.stream).not.toBe(null);
|
243
|
+
expect(meLoaded.root.list).not.toBe(null);
|
249
244
|
});
|
250
245
|
|
251
246
|
class RecordLike extends CoMap.Record(co.ref(TestMap)) {}
|
252
247
|
|
253
248
|
test("Deep loading a record-like coMap", async () => {
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
249
|
+
const me = await Account.create({
|
250
|
+
creationProps: { name: "Hermes Puggington" },
|
251
|
+
crypto: Crypto,
|
252
|
+
});
|
258
253
|
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
254
|
+
const [initialAsPeer, secondPeer] = connectedPeers("initial", "second", {
|
255
|
+
peer1role: "server",
|
256
|
+
peer2role: "client",
|
257
|
+
});
|
263
258
|
|
264
|
-
|
265
|
-
|
266
|
-
|
259
|
+
if (!isControlledAccount(me)) {
|
260
|
+
throw "me is not a controlled account";
|
261
|
+
}
|
267
262
|
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
263
|
+
me._raw.core.node.syncManager.addPeer(secondPeer);
|
264
|
+
const { account: meOnSecondPeer } = await createJazzContext({
|
265
|
+
auth: fixedCredentialsAuth({
|
266
|
+
accountID: me.id,
|
267
|
+
secret: me._raw.agentSecret,
|
268
|
+
}),
|
269
|
+
sessionProvider: randomSessionProvider,
|
270
|
+
peersToLoadFrom: [initialAsPeer],
|
271
|
+
crypto: Crypto,
|
272
|
+
});
|
278
273
|
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
{ owner: me },
|
284
|
-
),
|
285
|
-
key2: TestMap.create(
|
286
|
-
{ list: TestList.create([], { owner: me }) },
|
287
|
-
{ owner: me },
|
288
|
-
),
|
289
|
-
},
|
274
|
+
const record = RecordLike.create(
|
275
|
+
{
|
276
|
+
key1: TestMap.create(
|
277
|
+
{ list: TestList.create([], { owner: me }) },
|
290
278
|
{ owner: me },
|
291
|
-
|
279
|
+
),
|
280
|
+
key2: TestMap.create(
|
281
|
+
{ list: TestList.create([], { owner: me }) },
|
282
|
+
{ owner: me },
|
283
|
+
),
|
284
|
+
},
|
285
|
+
{ owner: me },
|
286
|
+
);
|
292
287
|
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
288
|
+
const recordLoaded = await RecordLike.load(record.id, meOnSecondPeer, [
|
289
|
+
{ list: [{}] },
|
290
|
+
]);
|
291
|
+
expectTypeOf(recordLoaded).toEqualTypeOf<
|
292
|
+
| (RecordLike & {
|
293
|
+
[key: string]: TestMap & {
|
294
|
+
list: TestList & InnerMap[];
|
295
|
+
};
|
296
|
+
})
|
297
|
+
| undefined
|
298
|
+
>();
|
299
|
+
if (recordLoaded === undefined) {
|
300
|
+
throw new Error("recordLoaded is undefined");
|
301
|
+
}
|
302
|
+
expect(recordLoaded.key1?.list).not.toBe(null);
|
303
|
+
expect(recordLoaded.key1?.list).not.toBe(undefined);
|
304
|
+
expect(recordLoaded.key2?.list).not.toBe(null);
|
305
|
+
expect(recordLoaded.key2?.list).not.toBe(undefined);
|
311
306
|
});
|