@ibgib/ts-gib 0.5.0 → 0.5.2

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.
@@ -25,31 +25,31 @@ import { ROOT, ROOT_ADDR } from '../constants.mjs';
25
25
  import { mut8 } from './mut8.mjs';
26
26
  import { getGib } from './transform-helper.mjs';
27
27
 
28
- describe(`when forking the root`, () => {
28
+ await respecfully(sir, `when forking the root`, async () => {
29
29
 
30
30
  const src = ROOT;
31
31
 
32
- it(`should create a new ibgib`, async () => {
32
+ await ifWe(sir, `should create a new ibgib`, async () => {
33
33
  const { newIbGib } = await fork({ src });
34
- expect(newIbGib).toBeTruthy();
34
+ iReckon(sir, newIbGib).isGonnaBeTruthy();
35
35
  });
36
36
 
37
- it(`should have no rel8ns (because forked from the root)`, async () => {
37
+ await ifWe(sir, `should have no rel8ns (because forked from the root)`, async () => {
38
38
  const { newIbGib } = await fork({ src });
39
- expect(newIbGib.rel8ns).toBeUndefined();
39
+ iReckon(sir, newIbGib.rel8ns).toBeUndefined();
40
40
  });
41
41
 
42
- describe(`should respect param`, () => {
43
- it(`noTimestamp`, async () => {
42
+ await respecfully(sir, `should respect param`, async () => {
43
+ await ifWe(sir, `noTimestamp`, async () => {
44
44
  const { newIbGib } = await fork({ src, noTimestamp: true });
45
45
  if (newIbGib?.data) {
46
- expect(newIbGib.data!.timestamp).toBeUndefined();
46
+ iReckon(sir, newIbGib.data!.timestamp).toBeUndefined();
47
47
  } else {
48
48
  // data being falsy is passing so no expect statement needed
49
49
  }
50
50
  });
51
51
 
52
- it(`destIb`, async () => {
52
+ await ifWe(sir, `destIb`, async () => {
53
53
  // just an example, ib can be any value/metadata per use case
54
54
  // in this example, we have a canonical form tag [tagName]
55
55
  // this way, we can just pass around the address (tag like ^ABCD123)
@@ -57,103 +57,103 @@ describe(`when forking the root`, () => {
57
57
  // entire data record.
58
58
  const destIb = 'tag like';
59
59
  const { newIbGib } = await fork({ src, destIb });
60
- expect(newIbGib.ib).toEqual(destIb);
60
+ iReckon(sir, newIbGib.ib).isGonnaBe(destIb);
61
61
  });
62
62
 
63
- it(`dna`, async () => {
63
+ await ifWe(sir, `dna`, async () => {
64
64
  // NOTE: more extensive dna testing is below in other tests
65
65
  const destIb = "This will be the new ib";
66
66
  const { newIbGib, dnas } = await fork({ src, dna: true, destIb });
67
- expect(dnas).toBeTruthy();
67
+ iReckon(sir, dnas).isGonnaBeTruthy();
68
68
  });
69
69
 
70
- it(`uuid`, async () => {
70
+ await ifWe(sir, `uuid`, async () => {
71
71
  const { newIbGib } = await fork({ src, uuid: true });
72
- expect(newIbGib?.data).toBeTruthy();
73
- expect(newIbGib!.data?.uuid).toBeTruthy();
72
+ iReckon(sir, newIbGib?.data).isGonnaBeTruthy();
73
+ iReckon(sir, newIbGib!.data?.uuid).isGonnaBeTruthy();
74
74
  });
75
75
 
76
- describe(`tjp...`, () => {
77
- it(`timestamp`, async () => {
76
+ await respecfully(sir, `tjp...`, async () => {
77
+ await ifWe(sir, `timestamp`, async () => {
78
78
  const { newIbGib } = await fork({ src, tjp: { timestamp: true } });
79
- expect(newIbGib?.data).toBeTruthy();
80
- expect(newIbGib!.data?.timestamp).toBeTruthy();
79
+ iReckon(sir, newIbGib?.data).isGonnaBeTruthy();
80
+ iReckon(sir, newIbGib!.data?.timestamp).isGonnaBeTruthy();
81
81
  const testDate = new Date(newIbGib!.data!.timestamp!);
82
- expect(testDate).toBeTruthy();
83
- expect(testDate).toBeTruthy();
84
- expect(testDate.toString()).not.toEqual("Invalid Date");
82
+ iReckon(sir, testDate).isGonnaBeTruthy();
83
+ iReckon(sir, testDate).isGonnaBeTruthy();
84
+ iReckon(sir, testDate.toString()).not.isGonnaBe("Invalid Date");
85
85
  // counting on environment (node) to be consistent with invalid dates in the future
86
86
  const invalidDate = new Date("asdf");
87
- expect(invalidDate.toString()).toEqual("Invalid Date");
88
- expect(newIbGib!.data?.isTjp).withContext("isTjp").toBeTrue();
87
+ iReckon(sir, invalidDate.toString()).isGonnaBe("Invalid Date");
88
+ iReckon(sir, newIbGib!.data?.isTjp).asTo("isTjp").toBeTrue();
89
89
  });
90
- it(`uuid`, async () => {
90
+ await ifWe(sir, `uuid`, async () => {
91
91
  const { newIbGib } = await fork({ src, tjp: { uuid: true } });
92
- expect(newIbGib?.data).toBeTruthy();
93
- expect(newIbGib!.data?.uuid).toBeTruthy();
94
- expect(newIbGib!.data?.isTjp).withContext("isTjp").toBeTrue()
92
+ iReckon(sir, newIbGib?.data).isGonnaBeTruthy();
93
+ iReckon(sir, newIbGib!.data?.uuid).isGonnaBeTruthy();
94
+ iReckon(sir, newIbGib!.data?.isTjp).asTo("isTjp").toBeTrue()
95
95
  });
96
- it(`timestamp && uuid`, async () => {
96
+ await ifWe(sir, `timestamp && uuid`, async () => {
97
97
  const { newIbGib } = await fork({ src, tjp: { timestamp: true, uuid: true } });
98
- expect(newIbGib?.data).toBeTruthy();
99
- expect(newIbGib!.data?.timestamp).toBeTruthy();
98
+ iReckon(sir, newIbGib?.data).isGonnaBeTruthy();
99
+ iReckon(sir, newIbGib!.data?.timestamp).isGonnaBeTruthy();
100
100
  const testDate = new Date(newIbGib!.data!.timestamp!);
101
- expect(testDate).toBeTruthy();
102
- expect(testDate).toBeTruthy();
103
- expect(testDate.toString()).not.toEqual("Invalid Date");
104
- expect(newIbGib!.data?.uuid).toBeTruthy();
105
- expect(newIbGib!.data?.isTjp).withContext("isTjp").toBeTrue()
101
+ iReckon(sir, testDate).isGonnaBeTruthy();
102
+ iReckon(sir, testDate).isGonnaBeTruthy();
103
+ iReckon(sir, testDate.toString()).not.isGonnaBe("Invalid Date");
104
+ iReckon(sir, newIbGib!.data?.uuid).isGonnaBeTruthy();
105
+ iReckon(sir, newIbGib!.data?.isTjp).asTo("isTjp").toBeTrue()
106
106
  });
107
107
  });
108
108
 
109
- it(`nCounter`, async () => {
109
+ await ifWe(sir, `nCounter`, async () => {
110
110
  const { newIbGib } = await fork({ src, nCounter: true });
111
- expect(newIbGib?.data).toBeTruthy();
112
- expect(newIbGib!.data?.n).toEqual(0);
111
+ iReckon(sir, newIbGib?.data).isGonnaBeTruthy();
112
+ iReckon(sir, newIbGib!.data?.n).isGonnaBe(0);
113
113
  });
114
114
 
115
115
 
116
- it(`cloneRel8ns (setting should be ignored since forking root)`, async () => {
116
+ await ifWe(sir, `cloneRel8ns (setting should be ignored since forking root)`, async () => {
117
117
  const { newIbGib } = await fork({ src, cloneRel8ns: true, noTimestamp: true });
118
- expect(newIbGib?.rel8ns).toBeUndefined();
118
+ iReckon(sir, newIbGib?.rel8ns).toBeUndefined();
119
119
  });
120
120
 
121
- it(`cloneData (setting should be ignored since forking root)`, async () => {
121
+ await ifWe(sir, `cloneData (setting should be ignored since forking root)`, async () => {
122
122
  const { newIbGib } = await fork({ src, cloneData: true, noTimestamp: true });
123
- expect(newIbGib?.data).toBeUndefined();
123
+ iReckon(sir, newIbGib?.data).toBeUndefined();
124
124
  });
125
125
  });
126
126
 
127
- describe(`...and creating dna`, () => {
128
- it(`should have well-formed dna, like...`, async () => {
127
+ await respecfully(sir, `...and creating dna`, async () => {
128
+ await ifWe(sir, `should have well-formed dna, like...`, async () => {
129
129
  const destIb = "This will be the new ib";
130
130
  const { newIbGib, intermediateIbGibs, dnas } = await fork({ src, dna: true, destIb });
131
131
  const forkDna = dnas![0];
132
132
 
133
- expect(forkDna.ib).withContext(`ib should be fork`).toEqual('fork');
133
+ iReckon(sir, forkDna.ib).asTo(`ib should be fork`).isGonnaBe('fork');
134
134
 
135
135
  let ibGibs = [newIbGib, ...(intermediateIbGibs ?? []), ...(dnas ?? [])];
136
136
  for (let i = 0; i < ibGibs.length; i++) {
137
137
  const ibGib = ibGibs[i];
138
138
  let gottenGib = await getGib({ ibGib });
139
- expect(ibGib.gib).withContext(`should have a gib that is corroborated with getGib`).toEqual(gottenGib);
139
+ iReckon(sir, ibGib.gib).asTo(`should have a gib that is corroborated with getGib`).isGonnaBe(gottenGib);
140
140
  }
141
141
 
142
- expect(forkDna?.rel8ns).withContext(`should descend from fork^gib primitive`).toBeTruthy();
142
+ iReckon(sir, forkDna?.rel8ns).asTo(`should descend from fork^gib primitive`).isGonnaBeTruthy();
143
143
  const forkDnaRel8ns: IbGibRel8ns_V1 = forkDna?.rel8ns!;
144
- expect(forkDnaRel8ns.ancestor).withContext(`should descend from fork^gib primitive`).toBeTruthy();
145
- expect(forkDnaRel8ns.ancestor!.length).withContext(`should descend from fork^gib primitive`).toEqual(1);
146
- expect(forkDnaRel8ns.ancestor![0]).withContext(`should descend from fork^gib primitive`).toEqual('fork^gib');
144
+ iReckon(sir, forkDnaRel8ns.ancestor).asTo(`should descend from fork^gib primitive`).isGonnaBeTruthy();
145
+ iReckon(sir, forkDnaRel8ns.ancestor!.length).asTo(`should descend from fork^gib primitive`).isGonnaBe(1);
146
+ iReckon(sir, forkDnaRel8ns.ancestor![0]).asTo(`should descend from fork^gib primitive`).isGonnaBe('fork^gib');
147
147
 
148
148
  const forkDnaData = (forkDna.data as TransformOpts_Fork<IbGib_V1>)!;
149
149
 
150
- expect(forkDna.data).withContext(`should have well-formed common transform opts`).toBeTruthy();
151
- expect(forkDnaData.dna).withContext(`should have well-formed common transform opts`).toBeTrue()
152
- expect(forkDnaData.srcAddr).withContext(`should have well-formed common transform opts`).toBeUndefined();
153
- expect(forkDnaData.src).withContext(`should have well-formed common transform opts`).toBeUndefined();
150
+ iReckon(sir, forkDna.data).asTo(`should have well-formed common transform opts`).isGonnaBeTruthy();
151
+ iReckon(sir, forkDnaData.dna).asTo(`should have well-formed common transform opts`).toBeTrue()
152
+ iReckon(sir, forkDnaData.srcAddr).asTo(`should have well-formed common transform opts`).toBeUndefined();
153
+ iReckon(sir, forkDnaData.src).asTo(`should have well-formed common transform opts`).toBeUndefined();
154
154
 
155
- expect(forkDnaData.type).withContext(`should have well-formed data specific to fork transform`).toEqual("fork");
156
- expect(forkDnaData.destIb).withContext(`should have well-formed data specific to fork transform`).toEqual(destIb);
155
+ iReckon(sir, forkDnaData.type).asTo(`should have well-formed data specific to fork transform`).isGonnaBe("fork");
156
+ iReckon(sir, forkDnaData.destIb).asTo(`should have well-formed data specific to fork transform`).isGonnaBe(destIb);
157
157
 
158
158
  // we're going to do another fork with the same options gotten from the dna
159
159
  // (kinda like translating a foreign language translation back into the
@@ -170,26 +170,26 @@ describe(`when forking the root`, () => {
170
170
  const forkOpts2: TransformOpts_Fork<IbGib_V1> = clone(forkDnaData);
171
171
  forkOpts2.src = ROOT;
172
172
  const { newIbGib: newIbGib2, dnas: dnas2 } = await fork(forkOpts2);
173
- expect(newIbGib2).withContext(`should produce pure dna function, and non-unique dna (without timestamps, tjp, or uuid) (1s delay)`).toBeTruthy();
174
- expect(dnas2).withContext(`should produce pure dna function, and non-unique dna (without timestamps, tjp, or uuid) (1s delay)`).toBeTruthy();
173
+ iReckon(sir, newIbGib2).asTo(`should produce pure dna function, and non-unique dna (without timestamps, tjp, or uuid) (1s delay)`).isGonnaBeTruthy();
174
+ iReckon(sir, dnas2).asTo(`should produce pure dna function, and non-unique dna (without timestamps, tjp, or uuid) (1s delay)`).isGonnaBeTruthy();
175
175
  const forkDna2 = dnas2![0];
176
176
 
177
177
  // dna itself should be exactly the same
178
- expect(forkDna2).withContext(`should produce pure dna function, and non-unique dna (without timestamps, tjp, or uuid) (1s delay)`).toEqual(forkDna);
178
+ iReckon(sir, forkDna2).asTo(`should produce pure dna function, and non-unique dna (without timestamps, tjp, or uuid) (1s delay)`).isGonnaBe(forkDna);
179
179
 
180
180
  // the ibGibs **created** should NOT be the same because of timestamping
181
181
  // (and later on, other factors would change like identity and other rel8ns)
182
- expect(newIbGib2.gib).withContext(`should produce pure dna function, and non-unique dna (without timestamps, tjp, or uuid) (1s delay)`).not.toEqual(newIbGib.gib);
182
+ iReckon(sir, newIbGib2.gib).asTo(`should produce pure dna function, and non-unique dna (without timestamps, tjp, or uuid) (1s delay)`).not.isGonnaBe(newIbGib.gib);
183
183
 
184
184
  // when forking using the same options, the ib should be the same
185
- expect(newIbGib2.ib).withContext(`should produce pure dna function, and non-unique dna (without timestamps, tjp, or uuid) (1s delay)`).toEqual(newIbGib.ib);
185
+ iReckon(sir, newIbGib2.ib).asTo(`should produce pure dna function, and non-unique dna (without timestamps, tjp, or uuid) (1s delay)`).isGonnaBe(newIbGib.ib);
186
186
  });
187
187
  }); // dna
188
188
 
189
189
  });
190
190
 
191
191
 
192
- describe(`when forking a regular ibgib`, () => {
192
+ await respecfully(sir, `when forking a regular ibgib`, async () => {
193
193
 
194
194
  let src: IbGib_V1;
195
195
  let srcAddr: IbGibAddr;
@@ -199,23 +199,23 @@ describe(`when forking a regular ibgib`, () => {
199
199
  const beforeResult = await fork({ src: ROOT, uuid: true });
200
200
  src = beforeResult.newIbGib;
201
201
 
202
- expect(src).toBeTruthy();
202
+ iReckon(sir, src).isGonnaBeTruthy();
203
203
  });
204
204
 
205
- it(`should create a new ibgib`, async () => {
205
+ await ifWe(sir, `should create a new ibgib`, async () => {
206
206
  const { newIbGib } = await fork({ src });
207
- expect(newIbGib).toBeTruthy();
207
+ iReckon(sir, newIbGib).isGonnaBeTruthy();
208
208
  });
209
209
 
210
- it(`should have src ib^gib address in ancestor rel8n`, async () => {
210
+ await ifWe(sir, `should have src ib^gib address in ancestor rel8n`, async () => {
211
211
  const { newIbGib } = await fork({ src });
212
- expect(newIbGib?.rel8ns).toBeTruthy();
213
- expect(newIbGib?.rel8ns).toBeTruthy();
214
- expect(newIbGib?.rel8ns!.ancestor).toBeTruthy();
215
- expect(newIbGib?.rel8ns!.ancestor).toBeTruthy();
216
- expect(newIbGib?.rel8ns!.ancestor!.length).toEqual(1);
212
+ iReckon(sir, newIbGib?.rel8ns).isGonnaBeTruthy();
213
+ iReckon(sir, newIbGib?.rel8ns).isGonnaBeTruthy();
214
+ iReckon(sir, newIbGib?.rel8ns!.ancestor).isGonnaBeTruthy();
215
+ iReckon(sir, newIbGib?.rel8ns!.ancestor).isGonnaBeTruthy();
216
+ iReckon(sir, newIbGib?.rel8ns!.ancestor!.length).isGonnaBe(1);
217
217
  srcAddr = getIbGibAddr({ ibGib: src });
218
- expect(newIbGib?.rel8ns!.ancestor![0]).toEqual(srcAddr);
218
+ iReckon(sir, newIbGib?.rel8ns!.ancestor![0]).isGonnaBe(srcAddr);
219
219
  });
220
220
 
221
221
  // TODO: TEST FORK cloneRel8ns option ONCE REL8 IS IMPLEMENTED
@@ -225,18 +225,18 @@ describe(`when forking a regular ibgib`, () => {
225
225
  // const { newIbGib: parent } = await mut8({ src: grandparent, dataToAddOrPatch: testData });
226
226
  // const { newIbGib } = await fork({ src: parent, cloneData: true});
227
227
 
228
- // expect(newIbGib).toBeTruthy();
229
- // expect(newIbGib!.rel8ns).toBeTruthy();
230
- // expect(newIbGib!.rel8ns).toBeTruthy();
231
- // expect(newIbGib!.rel8ns!.ancestor).toBeTruthy();
232
- // expect(newIbGib!.rel8ns!.ancestor).toBeTruthy();
228
+ // expect(newIbGib).isGonnaBeTruthy();
229
+ // expect(newIbGib!.rel8ns).isGonnaBeTruthy();
230
+ // expect(newIbGib!.rel8ns).isGonnaBeTruthy();
231
+ // expect(newIbGib!.rel8ns!.ancestor).isGonnaBeTruthy();
232
+ // expect(newIbGib!.rel8ns!.ancestor).isGonnaBeTruthy();
233
233
  // const parentAddr = getIbGibAddr({ibGib: parent});
234
- // expect(newIbGib!.rel8ns!.ancestor![newIbGib!.rel8ns!.ancestor!.length-1]).toEqual(parentAddr);
235
- // expect(newIbGib!.data).toBeTruthy();
236
- // expect(newIbGib!.data).toEqual(testData);
234
+ // expect(newIbGib!.rel8ns!.ancestor![newIbGib!.rel8ns!.ancestor!.length-1]).isGonnaBe(parentAddr);
235
+ // expect(newIbGib!.data).isGonnaBeTruthy();
236
+ // expect(newIbGib!.data).isGonnaBe(testData);
237
237
  // });
238
238
 
239
- it(`cloneData`, async () => {
239
+ await ifWe(sir, `cloneData`, async () => {
240
240
  // adding uuid/timestamp for testing hack
241
241
  // need to reconsider inability to rename/remove timestamp data
242
242
  // seems silly since bad actors can always do this and security is
@@ -253,22 +253,22 @@ describe(`when forking a regular ibgib`, () => {
253
253
  });
254
254
  const { newIbGib } = await fork({ src: parent, cloneData: true, noTimestamp: true });
255
255
 
256
- expect(newIbGib).toBeTruthy();
257
- expect(newIbGib!.rel8ns).toBeTruthy();
258
- expect(newIbGib!.rel8ns).toBeTruthy();
259
- expect(newIbGib!.rel8ns!.ancestor).toBeTruthy();
260
- expect(newIbGib!.rel8ns!.ancestor).toBeTruthy();
256
+ iReckon(sir, newIbGib).isGonnaBeTruthy();
257
+ iReckon(sir, newIbGib!.rel8ns).isGonnaBeTruthy();
258
+ iReckon(sir, newIbGib!.rel8ns).isGonnaBeTruthy();
259
+ iReckon(sir, newIbGib!.rel8ns!.ancestor).isGonnaBeTruthy();
260
+ iReckon(sir, newIbGib!.rel8ns!.ancestor).isGonnaBeTruthy();
261
261
  const parentAddr = getIbGibAddr({ ibGib: parent });
262
- expect(newIbGib!.rel8ns!.ancestor![newIbGib!.rel8ns!.ancestor!.length - 1]).toEqual(parentAddr);
263
- expect(newIbGib!.data).toBeTruthy();
264
- expect(newIbGib!.data).toEqual(testData);
262
+ iReckon(sir, newIbGib!.rel8ns!.ancestor![newIbGib!.rel8ns!.ancestor!.length - 1]).isGonnaBe(parentAddr);
263
+ iReckon(sir, newIbGib!.data).isGonnaBeTruthy();
264
+ iReckon(sir, newIbGib!.data).isGonnaBe(testData);
265
265
  });
266
266
 
267
267
  // it(`should clone data`, async () => {
268
268
  // });
269
269
  });
270
270
 
271
- describe(`when forking multiple regular ibgibs, NON LINKED REL8NS`, () => {
271
+ await respecfully(sir, `when forking multiple regular ibgibs, NON LINKED REL8NS`, async () => {
272
272
 
273
273
  const ibs: Ib[] = ["a", "b", "c", "d"];
274
274
  let srcForks: { [ib: string]: TransformResult<IbGib_V1> } = {};
@@ -290,16 +290,16 @@ describe(`when forking multiple regular ibgibs, NON LINKED REL8NS`, () => {
290
290
  srcIbGibs = {};
291
291
  })
292
292
 
293
- it(`should create a new ibgib`, async () => {
293
+ await ifWe(sir, `should create a new ibgib`, async () => {
294
294
  ibs.forEach(ib => {
295
295
  const ibGib = srcIbGibs[ib];
296
- expect(ibGib).toBeTruthy();
297
- expect(ibGib).toBeTruthy();
298
- expect(ibGib.ib).toEqual(ib);
296
+ iReckon(sir, ibGib).isGonnaBeTruthy();
297
+ iReckon(sir, ibGib).isGonnaBeTruthy();
298
+ iReckon(sir, ibGib.ib).isGonnaBe(ib);
299
299
  })
300
300
  });
301
301
 
302
- it(`should have src ib^gib (address) in ancestor rel8n`, async () => {
302
+ await ifWe(sir, `should have src ib^gib (address) in ancestor rel8n`, async () => {
303
303
  const getPrev: (ib: Ib) => IbGib_V1 | null = (ib) => {
304
304
  switch (ib) {
305
305
  case "a": return null;
@@ -313,13 +313,13 @@ describe(`when forking multiple regular ibgibs, NON LINKED REL8NS`, () => {
313
313
  ibs.filter(ib => ib !== "a").forEach(ib => {
314
314
  const newIbGib = srcIbGibs[ib]!;
315
315
  const prevIbGib = getPrev(ib)!;
316
- expect(newIbGib?.rel8ns).toBeTruthy();
317
- expect(newIbGib?.rel8ns).toBeTruthy();
318
- expect(newIbGib?.rel8ns!.ancestor).toBeTruthy();
319
- expect(newIbGib?.rel8ns!.ancestor).toBeTruthy();
320
- expect(newIbGib?.rel8ns!.ancestor!.length).toBeGreaterThan(0);
316
+ iReckon(sir, newIbGib?.rel8ns).isGonnaBeTruthy();
317
+ iReckon(sir, newIbGib?.rel8ns).isGonnaBeTruthy();
318
+ iReckon(sir, newIbGib?.rel8ns!.ancestor).isGonnaBeTruthy();
319
+ iReckon(sir, newIbGib?.rel8ns!.ancestor).isGonnaBeTruthy();
320
+ iReckon(sir, newIbGib?.rel8ns!.ancestor!.length).toBeGreaterThan(0);
321
321
  const prevIbGibAddr = getIbGibAddr({ ibGib: prevIbGib });
322
- expect(newIbGib?.rel8ns!.ancestor![newIbGib!.rel8ns!.ancestor!.length - 1]).toEqual(prevIbGibAddr);
322
+ iReckon(sir, newIbGib?.rel8ns!.ancestor![newIbGib!.rel8ns!.ancestor!.length - 1]).isGonnaBe(prevIbGibAddr);
323
323
  })
324
324
  });
325
325
 
@@ -328,17 +328,17 @@ describe(`when forking multiple regular ibgibs, NON LINKED REL8NS`, () => {
328
328
  // throw new Error('not implemented yet');
329
329
  // const testData = { yo: "there" }
330
330
  // const { newIbGib } = await fork({ src });
331
- // expect(newIbGib?.rel8ns).toBeTruthy();
332
- // expect(newIbGib?.rel8ns).toBeTruthy();
333
- // expect(newIbGib?.rel8ns!.ancestor).toBeTruthy();
334
- // expect(newIbGib?.rel8ns!.ancestor).toBeTruthy();
335
- // expect(newIbGib?.rel8ns!.ancestor!.length).toEqual(1);
331
+ // expect(newIbGib?.rel8ns).isGonnaBeTruthy();
332
+ // expect(newIbGib?.rel8ns).isGonnaBeTruthy();
333
+ // expect(newIbGib?.rel8ns!.ancestor).isGonnaBeTruthy();
334
+ // expect(newIbGib?.rel8ns!.ancestor).isGonnaBeTruthy();
335
+ // expect(newIbGib?.rel8ns!.ancestor!.length).isGonnaBe(1);
336
336
  // srcAddr = getIbGibAddr({ibGib: src});
337
- // expect(newIbGib?.rel8ns!.ancestor![0]).toEqual(srcAddr);
337
+ // expect(newIbGib?.rel8ns!.ancestor![0]).isGonnaBe(srcAddr);
338
338
  // });
339
339
  });
340
340
 
341
- describe(`when forking with YES LINKED 'ancestor' rel8n...`, () => {
341
+ await respecfully(sir, `when forking with YES LINKED 'ancestor' rel8n...`, async () => {
342
342
 
343
343
  const ibs: Ib[] = ["a", "b", "c", "d"];
344
344
  let srcForks: { [ib: string]: TransformResult<IbGib_V1> } = {};
@@ -366,16 +366,16 @@ describe(`when forking with YES LINKED 'ancestor' rel8n...`, () => {
366
366
  srcIbGibs = {};
367
367
  })
368
368
 
369
- it(`should create a new ibgib`, async () => {
369
+ await ifWe(sir, `should create a new ibgib`, async () => {
370
370
  ibs.forEach(ib => {
371
371
  const ibGib = srcIbGibs[ib];
372
- expect(ibGib).toBeTruthy();
373
- expect(ibGib).toBeTruthy();
374
- expect(ibGib.ib).toEqual(ib);
372
+ iReckon(sir, ibGib).isGonnaBeTruthy();
373
+ iReckon(sir, ibGib).isGonnaBeTruthy();
374
+ iReckon(sir, ibGib.ib).isGonnaBe(ib);
375
375
  })
376
376
  });
377
377
 
378
- it(`should have src ib^gib (address) in ancestor rel8n`, async () => {
378
+ await ifWe(sir, `should have src ib^gib (address) in ancestor rel8n`, async () => {
379
379
  const getPrevIbGib: (ib: Ib) => IbGib_V1 | null = (ib) => {
380
380
  switch (ib) {
381
381
  case "a": return null;
@@ -388,24 +388,24 @@ describe(`when forking with YES LINKED 'ancestor' rel8n...`, () => {
388
388
  // the first one forks from the root, so the rel8ns should be undefined which is tested elsewhere
389
389
  ibs.filter(ib => ib === "a").forEach(ib => {
390
390
  const newIbGib = srcIbGibs[ib]!;
391
- expect(newIbGib?.rel8ns).toBeUndefined();
392
- // expect(newIbGib?.rel8ns!.ancestor).toBeTruthy();
393
- // expect(newIbGib?.rel8ns!.ancestor).toBeTruthy();
394
- // expect(newIbGib?.rel8ns!.ancestor!.length).toEqual(1);
391
+ iReckon(sir, newIbGib?.rel8ns).toBeUndefined();
392
+ // expect(newIbGib?.rel8ns!.ancestor).isGonnaBeTruthy();
393
+ // expect(newIbGib?.rel8ns!.ancestor).isGonnaBeTruthy();
394
+ // expect(newIbGib?.rel8ns!.ancestor!.length).isGonnaBe(1);
395
395
  // const prevIbGibAddr = getIbGibAddr({ibGib: prevIbGib});
396
- // expect(newIbGib?.rel8ns!.ancestor![0]).toEqual(prevIbGibAddr);
396
+ // expect(newIbGib?.rel8ns!.ancestor![0]).isGonnaBe(prevIbGibAddr);
397
397
  });
398
398
  ibs.filter(ib => ib !== "a").forEach(ib => {
399
399
  const newIbGib = srcIbGibs[ib]!;
400
400
  const prevIbGib = getPrevIbGib(ib)!;
401
- expect(newIbGib?.rel8ns).toBeTruthy();
402
- expect(newIbGib?.rel8ns).toBeTruthy();
403
- expect(newIbGib?.rel8ns!.ancestor).toBeTruthy();
404
- expect(newIbGib?.rel8ns!.ancestor).toBeTruthy();
405
- expect(newIbGib?.rel8ns!.ancestor!.length).toEqual(1);
401
+ iReckon(sir, newIbGib?.rel8ns).isGonnaBeTruthy();
402
+ iReckon(sir, newIbGib?.rel8ns).isGonnaBeTruthy();
403
+ iReckon(sir, newIbGib?.rel8ns!.ancestor).isGonnaBeTruthy();
404
+ iReckon(sir, newIbGib?.rel8ns!.ancestor).isGonnaBeTruthy();
405
+ iReckon(sir, newIbGib?.rel8ns!.ancestor!.length).isGonnaBe(1);
406
406
  const prevIbGibAddr = getIbGibAddr({ ibGib: prevIbGib });
407
- expect(newIbGib?.rel8ns!.ancestor![0]).toEqual(prevIbGibAddr);
407
+ iReckon(sir, newIbGib?.rel8ns!.ancestor![0]).isGonnaBe(prevIbGibAddr);
408
408
  });
409
409
  });
410
410
 
411
- });
411
+ });
@@ -1,4 +1,4 @@
1
1
  export * from './fork.mjs';
2
2
  export * from './mut8.mjs';
3
3
  export * from './rel8.mjs';
4
- export { isPrimitive, isDna } from './transform-helper.mjs';
4
+ export * from './transform-helper.mjs';