@fedify/testing 2.0.8 → 2.0.10
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/mod.cjs +23 -56
- package/dist/mod.d.cts +1 -9
- package/dist/mod.d.ts +1 -9
- package/dist/mod.js +13 -24
- package/package.json +4 -4
package/dist/mod.cjs
CHANGED
|
@@ -1,41 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
9
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
13
|
-
key = keys[i];
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
|
-
get: ((k) => from[k]).bind(null, key),
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
22
|
-
value: mod,
|
|
23
|
-
enumerable: true
|
|
24
|
-
}) : target, mod));
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
|
-
const __fedify_vocab = __toESM(require("@fedify/vocab"));
|
|
28
|
-
const __fedify_fedify_federation = __toESM(require("@fedify/fedify/federation"));
|
|
29
|
-
const es_toolkit = __toESM(require("es-toolkit"));
|
|
30
|
-
const node_assert_strict = __toESM(require("node:assert/strict"));
|
|
31
|
-
|
|
1
|
+
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
let _fedify_vocab = require("@fedify/vocab");
|
|
4
|
+
let _fedify_fedify_federation = require("@fedify/fedify/federation");
|
|
5
|
+
let es_toolkit = require("es-toolkit");
|
|
6
|
+
let node_assert_strict = require("node:assert/strict");
|
|
32
7
|
//#region src/docloader.ts
|
|
33
8
|
const mockDocumentLoader = async (url) => ({
|
|
34
9
|
contextUrl: null,
|
|
35
10
|
document: {},
|
|
36
11
|
documentUrl: url
|
|
37
12
|
});
|
|
38
|
-
|
|
39
13
|
//#endregion
|
|
40
14
|
//#region src/context.ts
|
|
41
15
|
const noopTracerProvider$1 = { getTracer: () => ({
|
|
@@ -45,7 +19,7 @@ const noopTracerProvider$1 = { getTracer: () => ({
|
|
|
45
19
|
function createContext(values) {
|
|
46
20
|
const { federation, url = new URL("http://example.com/"), canonicalOrigin, data, documentLoader, contextLoader, tracerProvider, clone, getNodeInfoUri, getActorUri, getObjectUri, getCollectionUri, getOutboxUri, getInboxUri, getFollowingUri, getFollowersUri, getLikedUri, getFeaturedUri, getFeaturedTagsUri, parseUri, getActorKeyPairs, getDocumentLoader, lookupObject, traverseCollection, lookupNodeInfo, lookupWebFinger, sendActivity, routeActivity } = values;
|
|
47
21
|
function throwRouterError() {
|
|
48
|
-
throw new
|
|
22
|
+
throw new _fedify_fedify_federation.RouterError("Not implemented");
|
|
49
23
|
}
|
|
50
24
|
return {
|
|
51
25
|
federation,
|
|
@@ -57,9 +31,9 @@ function createContext(values) {
|
|
|
57
31
|
documentLoader: documentLoader ?? mockDocumentLoader,
|
|
58
32
|
contextLoader: contextLoader ?? mockDocumentLoader,
|
|
59
33
|
tracerProvider: tracerProvider ?? noopTracerProvider$1,
|
|
60
|
-
clone: clone ?? ((data
|
|
34
|
+
clone: clone ?? ((data) => createContext({
|
|
61
35
|
...values,
|
|
62
|
-
data
|
|
36
|
+
data
|
|
63
37
|
})),
|
|
64
38
|
getNodeInfoUri: getNodeInfoUri ?? throwRouterError,
|
|
65
39
|
getActorUri: getActorUri ?? throwRouterError,
|
|
@@ -80,13 +54,13 @@ function createContext(values) {
|
|
|
80
54
|
}),
|
|
81
55
|
getActorKeyPairs: getActorKeyPairs ?? ((_handle) => Promise.resolve([])),
|
|
82
56
|
lookupObject: lookupObject ?? ((uri, options = {}) => {
|
|
83
|
-
return (0,
|
|
57
|
+
return (0, _fedify_vocab.lookupObject)(uri, {
|
|
84
58
|
documentLoader: options.documentLoader ?? documentLoader ?? mockDocumentLoader,
|
|
85
59
|
contextLoader: options.contextLoader ?? contextLoader ?? mockDocumentLoader
|
|
86
60
|
});
|
|
87
61
|
}),
|
|
88
62
|
traverseCollection: traverseCollection ?? ((collection, options = {}) => {
|
|
89
|
-
return (0,
|
|
63
|
+
return (0, _fedify_vocab.traverseCollection)(collection, {
|
|
90
64
|
documentLoader: options.documentLoader ?? documentLoader ?? mockDocumentLoader,
|
|
91
65
|
contextLoader: options.contextLoader ?? contextLoader ?? mockDocumentLoader
|
|
92
66
|
});
|
|
@@ -150,7 +124,6 @@ function createInboxContext(args) {
|
|
|
150
124
|
})
|
|
151
125
|
};
|
|
152
126
|
}
|
|
153
|
-
|
|
154
127
|
//#endregion
|
|
155
128
|
//#region src/mock.ts
|
|
156
129
|
const noopTracerProvider = { getTracer: () => ({
|
|
@@ -369,9 +342,8 @@ var MockFederation = class {
|
|
|
369
342
|
}
|
|
370
343
|
createContext(baseUrlOrRequest, contextData) {
|
|
371
344
|
const mockFederation = this;
|
|
372
|
-
const url = baseUrlOrRequest instanceof Request ? new URL(baseUrlOrRequest.url) : baseUrlOrRequest;
|
|
373
345
|
return new MockContext({
|
|
374
|
-
url,
|
|
346
|
+
url: baseUrlOrRequest instanceof Request ? new URL(baseUrlOrRequest.url) : baseUrlOrRequest,
|
|
375
347
|
data: contextData,
|
|
376
348
|
federation: mockFederation
|
|
377
349
|
});
|
|
@@ -393,13 +365,10 @@ var MockFederation = class {
|
|
|
393
365
|
const typeName = activity.constructor.name;
|
|
394
366
|
const listeners = this.inboxListeners.get(typeName) || [];
|
|
395
367
|
if (listeners.length > 0 && this.contextData === void 0) throw new Error("MockFederation.receiveActivity(): contextData is not initialized. Please provide contextData through the constructor or call startQueue() before receiving activities.");
|
|
396
|
-
for (const listener of listeners) {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
});
|
|
401
|
-
await listener(context, activity);
|
|
402
|
-
}
|
|
368
|
+
for (const listener of listeners) await listener(createInboxContext({
|
|
369
|
+
data: this.contextData,
|
|
370
|
+
federation: this
|
|
371
|
+
}), activity);
|
|
403
372
|
}
|
|
404
373
|
/**
|
|
405
374
|
* Clears all sent activities from the mock federation.
|
|
@@ -533,10 +502,10 @@ var MockContext = class MockContext {
|
|
|
533
502
|
this.request = new Request(url);
|
|
534
503
|
this.data = options.data;
|
|
535
504
|
this.federation = options.federation;
|
|
536
|
-
this.documentLoader = options.documentLoader ?? (async (url
|
|
505
|
+
this.documentLoader = options.documentLoader ?? (async (url) => ({
|
|
537
506
|
contextUrl: null,
|
|
538
507
|
document: {},
|
|
539
|
-
documentUrl: url
|
|
508
|
+
documentUrl: url
|
|
540
509
|
}));
|
|
541
510
|
this.contextLoader = options.contextLoader ?? this.documentLoader;
|
|
542
511
|
this.tracerProvider = options.tracerProvider ?? noopTracerProvider;
|
|
@@ -589,8 +558,8 @@ var MockContext = class MockContext {
|
|
|
589
558
|
if (this.federation instanceof MockFederation) {
|
|
590
559
|
const pathTemplate = this.federation.objectPaths.get(cls.typeId.href);
|
|
591
560
|
if (pathTemplate) {
|
|
592
|
-
const path
|
|
593
|
-
return new URL(path
|
|
561
|
+
const path = expandUriTemplate(pathTemplate, values);
|
|
562
|
+
return new URL(path, this.origin);
|
|
594
563
|
}
|
|
595
564
|
}
|
|
596
565
|
const path = globalThis.Object.entries(values).map(([key, value]) => `${key}/${value}`).join("/");
|
|
@@ -669,12 +638,12 @@ var MockContext = class MockContext {
|
|
|
669
638
|
const owner = this.getActorUri(identifier);
|
|
670
639
|
return keyPairs.map((kp) => ({
|
|
671
640
|
...kp,
|
|
672
|
-
cryptographicKey: new
|
|
641
|
+
cryptographicKey: new _fedify_vocab.CryptographicKey({
|
|
673
642
|
id: kp.keyId,
|
|
674
643
|
owner,
|
|
675
644
|
publicKey: kp.publicKey
|
|
676
645
|
}),
|
|
677
|
-
multikey: new
|
|
646
|
+
multikey: new _fedify_vocab.Multikey({
|
|
678
647
|
id: kp.keyId,
|
|
679
648
|
controller: owner,
|
|
680
649
|
publicKey: kp.publicKey
|
|
@@ -738,7 +707,6 @@ var MockContext = class MockContext {
|
|
|
738
707
|
this.sentActivities = [];
|
|
739
708
|
}
|
|
740
709
|
};
|
|
741
|
-
|
|
742
710
|
//#endregion
|
|
743
711
|
//#region src/mq-tester.ts
|
|
744
712
|
/**
|
|
@@ -919,7 +887,6 @@ async function waitFor(predicate, timeoutMs) {
|
|
|
919
887
|
}
|
|
920
888
|
}
|
|
921
889
|
const getRandomKey = (prefix) => `fedify_test_${prefix}_${crypto.randomUUID()}`;
|
|
922
|
-
|
|
923
890
|
//#endregion
|
|
924
891
|
exports.createContext = createContext;
|
|
925
892
|
exports.createFederation = createFederation;
|
|
@@ -927,4 +894,4 @@ exports.createInboxContext = createInboxContext;
|
|
|
927
894
|
exports.createRequestContext = createRequestContext;
|
|
928
895
|
exports.getRandomKey = getRandomKey;
|
|
929
896
|
exports.testMessageQueue = testMessageQueue;
|
|
930
|
-
exports.waitFor = waitFor;
|
|
897
|
+
exports.waitFor = waitFor;
|
package/dist/mod.d.cts
CHANGED
|
@@ -3,8 +3,6 @@ import { Activity } from "@fedify/vocab";
|
|
|
3
3
|
import { MessageQueue } from "@fedify/fedify";
|
|
4
4
|
|
|
5
5
|
//#region src/context.d.ts
|
|
6
|
-
// NOTE: Copied from @fedify/fedify/testing/context.ts
|
|
7
|
-
// Not exported - used internally only. Public API is in mock.ts
|
|
8
6
|
declare function createContext<TContextData>(values: Partial<Context<TContextData>> & {
|
|
9
7
|
url?: URL;
|
|
10
8
|
data: TContextData;
|
|
@@ -41,7 +39,6 @@ declare function createInboxContext<TContextData>(args: Partial<InboxContext<TCo
|
|
|
41
39
|
recipient?: string | null;
|
|
42
40
|
federation: Federation<TContextData>;
|
|
43
41
|
}): TestInboxContext<TContextData>;
|
|
44
|
-
// Export for internal use by mock.ts only
|
|
45
42
|
//#endregion
|
|
46
43
|
//#region src/mock.d.ts
|
|
47
44
|
/**
|
|
@@ -64,9 +61,7 @@ interface SentActivity {
|
|
|
64
61
|
* @since 1.9.1
|
|
65
62
|
*/
|
|
66
63
|
interface TestContext<TContextData> extends Omit<Context<TContextData>, "clone">, Pick<RequestContext<TContextData>, "request" | "url" | "getActor" | "getObject" | "getSignedKey" | "getSignedKeyOwner" | "sendActivity" | "routeActivity"> {
|
|
67
|
-
// Override clone to return TestContext
|
|
68
64
|
clone(data: TContextData): TestContext<TContextData>;
|
|
69
|
-
// Test-specific methods
|
|
70
65
|
getSentActivities(): Array<{
|
|
71
66
|
sender: any;
|
|
72
67
|
recipients: any;
|
|
@@ -80,14 +75,11 @@ interface TestContext<TContextData> extends Omit<Context<TContextData>, "clone">
|
|
|
80
75
|
* @since 1.9.1
|
|
81
76
|
*/
|
|
82
77
|
interface TestFederation<TContextData> extends Omit<Federation<TContextData>, "createContext"> {
|
|
83
|
-
// Test-specific properties
|
|
84
78
|
sentActivities: SentActivity[];
|
|
85
79
|
queueStarted: boolean;
|
|
86
80
|
sentCounter: number;
|
|
87
|
-
// Test-specific methods
|
|
88
81
|
receiveActivity(activity: Activity): Promise<void>;
|
|
89
82
|
reset(): void;
|
|
90
|
-
// Override createContext to return TestContext
|
|
91
83
|
createContext(baseUrlOrRequest: URL | Request, contextData: TContextData): TestContext<TContextData>;
|
|
92
84
|
}
|
|
93
85
|
/**
|
|
@@ -202,4 +194,4 @@ declare function testMessageQueue<MQ extends MessageQueue>(getMessageQueue: () =
|
|
|
202
194
|
declare function waitFor(predicate: () => boolean, timeoutMs: number): Promise<void>;
|
|
203
195
|
declare const getRandomKey: (prefix: string) => string;
|
|
204
196
|
//#endregion
|
|
205
|
-
export { TestMessageQueueOptions, createContext, createFederation, createInboxContext, createRequestContext, getRandomKey, testMessageQueue, waitFor };
|
|
197
|
+
export { type TestMessageQueueOptions, createContext, createFederation, createInboxContext, createRequestContext, getRandomKey, testMessageQueue, waitFor };
|
package/dist/mod.d.ts
CHANGED
|
@@ -4,8 +4,6 @@ import { Context, Federation, InboxContext, RequestContext } from "@fedify/fedif
|
|
|
4
4
|
import { MessageQueue } from "@fedify/fedify";
|
|
5
5
|
|
|
6
6
|
//#region src/context.d.ts
|
|
7
|
-
// NOTE: Copied from @fedify/fedify/testing/context.ts
|
|
8
|
-
// Not exported - used internally only. Public API is in mock.ts
|
|
9
7
|
declare function createContext<TContextData>(values: Partial<Context<TContextData>> & {
|
|
10
8
|
url?: URL;
|
|
11
9
|
data: TContextData;
|
|
@@ -42,7 +40,6 @@ declare function createInboxContext<TContextData>(args: Partial<InboxContext<TCo
|
|
|
42
40
|
recipient?: string | null;
|
|
43
41
|
federation: Federation<TContextData>;
|
|
44
42
|
}): TestInboxContext<TContextData>;
|
|
45
|
-
// Export for internal use by mock.ts only
|
|
46
43
|
//#endregion
|
|
47
44
|
//#region src/mock.d.ts
|
|
48
45
|
/**
|
|
@@ -65,9 +62,7 @@ interface SentActivity {
|
|
|
65
62
|
* @since 1.9.1
|
|
66
63
|
*/
|
|
67
64
|
interface TestContext<TContextData> extends Omit<Context<TContextData>, "clone">, Pick<RequestContext<TContextData>, "request" | "url" | "getActor" | "getObject" | "getSignedKey" | "getSignedKeyOwner" | "sendActivity" | "routeActivity"> {
|
|
68
|
-
// Override clone to return TestContext
|
|
69
65
|
clone(data: TContextData): TestContext<TContextData>;
|
|
70
|
-
// Test-specific methods
|
|
71
66
|
getSentActivities(): Array<{
|
|
72
67
|
sender: any;
|
|
73
68
|
recipients: any;
|
|
@@ -81,14 +76,11 @@ interface TestContext<TContextData> extends Omit<Context<TContextData>, "clone">
|
|
|
81
76
|
* @since 1.9.1
|
|
82
77
|
*/
|
|
83
78
|
interface TestFederation<TContextData> extends Omit<Federation<TContextData>, "createContext"> {
|
|
84
|
-
// Test-specific properties
|
|
85
79
|
sentActivities: SentActivity[];
|
|
86
80
|
queueStarted: boolean;
|
|
87
81
|
sentCounter: number;
|
|
88
|
-
// Test-specific methods
|
|
89
82
|
receiveActivity(activity: Activity): Promise<void>;
|
|
90
83
|
reset(): void;
|
|
91
|
-
// Override createContext to return TestContext
|
|
92
84
|
createContext(baseUrlOrRequest: URL | Request, contextData: TContextData): TestContext<TContextData>;
|
|
93
85
|
}
|
|
94
86
|
/**
|
|
@@ -203,4 +195,4 @@ declare function testMessageQueue<MQ extends MessageQueue>(getMessageQueue: () =
|
|
|
203
195
|
declare function waitFor(predicate: () => boolean, timeoutMs: number): Promise<void>;
|
|
204
196
|
declare const getRandomKey: (prefix: string) => string;
|
|
205
197
|
//#endregion
|
|
206
|
-
export { TestMessageQueueOptions, createContext, createFederation, createInboxContext, createRequestContext, getRandomKey, testMessageQueue, waitFor };
|
|
198
|
+
export { type TestMessageQueueOptions, createContext, createFederation, createInboxContext, createRequestContext, getRandomKey, testMessageQueue, waitFor };
|
package/dist/mod.js
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
-
|
|
1
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
4
2
|
import { CryptographicKey, Multikey, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
5
3
|
import { RouterError } from "@fedify/fedify/federation";
|
|
6
4
|
import { delay } from "es-toolkit";
|
|
7
5
|
import { deepStrictEqual, ok, strictEqual } from "node:assert/strict";
|
|
8
|
-
|
|
9
6
|
//#region src/docloader.ts
|
|
10
7
|
const mockDocumentLoader = async (url) => ({
|
|
11
8
|
contextUrl: null,
|
|
12
9
|
document: {},
|
|
13
10
|
documentUrl: url
|
|
14
11
|
});
|
|
15
|
-
|
|
16
12
|
//#endregion
|
|
17
13
|
//#region src/context.ts
|
|
18
14
|
const noopTracerProvider$1 = { getTracer: () => ({
|
|
@@ -34,9 +30,9 @@ function createContext(values) {
|
|
|
34
30
|
documentLoader: documentLoader ?? mockDocumentLoader,
|
|
35
31
|
contextLoader: contextLoader ?? mockDocumentLoader,
|
|
36
32
|
tracerProvider: tracerProvider ?? noopTracerProvider$1,
|
|
37
|
-
clone: clone ?? ((data
|
|
33
|
+
clone: clone ?? ((data) => createContext({
|
|
38
34
|
...values,
|
|
39
|
-
data
|
|
35
|
+
data
|
|
40
36
|
})),
|
|
41
37
|
getNodeInfoUri: getNodeInfoUri ?? throwRouterError,
|
|
42
38
|
getActorUri: getActorUri ?? throwRouterError,
|
|
@@ -127,7 +123,6 @@ function createInboxContext(args) {
|
|
|
127
123
|
})
|
|
128
124
|
};
|
|
129
125
|
}
|
|
130
|
-
|
|
131
126
|
//#endregion
|
|
132
127
|
//#region src/mock.ts
|
|
133
128
|
const noopTracerProvider = { getTracer: () => ({
|
|
@@ -346,9 +341,8 @@ var MockFederation = class {
|
|
|
346
341
|
}
|
|
347
342
|
createContext(baseUrlOrRequest, contextData) {
|
|
348
343
|
const mockFederation = this;
|
|
349
|
-
const url = baseUrlOrRequest instanceof Request ? new URL(baseUrlOrRequest.url) : baseUrlOrRequest;
|
|
350
344
|
return new MockContext({
|
|
351
|
-
url,
|
|
345
|
+
url: baseUrlOrRequest instanceof Request ? new URL(baseUrlOrRequest.url) : baseUrlOrRequest,
|
|
352
346
|
data: contextData,
|
|
353
347
|
federation: mockFederation
|
|
354
348
|
});
|
|
@@ -370,13 +364,10 @@ var MockFederation = class {
|
|
|
370
364
|
const typeName = activity.constructor.name;
|
|
371
365
|
const listeners = this.inboxListeners.get(typeName) || [];
|
|
372
366
|
if (listeners.length > 0 && this.contextData === void 0) throw new Error("MockFederation.receiveActivity(): contextData is not initialized. Please provide contextData through the constructor or call startQueue() before receiving activities.");
|
|
373
|
-
for (const listener of listeners) {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
});
|
|
378
|
-
await listener(context, activity);
|
|
379
|
-
}
|
|
367
|
+
for (const listener of listeners) await listener(createInboxContext({
|
|
368
|
+
data: this.contextData,
|
|
369
|
+
federation: this
|
|
370
|
+
}), activity);
|
|
380
371
|
}
|
|
381
372
|
/**
|
|
382
373
|
* Clears all sent activities from the mock federation.
|
|
@@ -510,10 +501,10 @@ var MockContext = class MockContext {
|
|
|
510
501
|
this.request = new Request(url);
|
|
511
502
|
this.data = options.data;
|
|
512
503
|
this.federation = options.federation;
|
|
513
|
-
this.documentLoader = options.documentLoader ?? (async (url
|
|
504
|
+
this.documentLoader = options.documentLoader ?? (async (url) => ({
|
|
514
505
|
contextUrl: null,
|
|
515
506
|
document: {},
|
|
516
|
-
documentUrl: url
|
|
507
|
+
documentUrl: url
|
|
517
508
|
}));
|
|
518
509
|
this.contextLoader = options.contextLoader ?? this.documentLoader;
|
|
519
510
|
this.tracerProvider = options.tracerProvider ?? noopTracerProvider;
|
|
@@ -566,8 +557,8 @@ var MockContext = class MockContext {
|
|
|
566
557
|
if (this.federation instanceof MockFederation) {
|
|
567
558
|
const pathTemplate = this.federation.objectPaths.get(cls.typeId.href);
|
|
568
559
|
if (pathTemplate) {
|
|
569
|
-
const path
|
|
570
|
-
return new URL(path
|
|
560
|
+
const path = expandUriTemplate(pathTemplate, values);
|
|
561
|
+
return new URL(path, this.origin);
|
|
571
562
|
}
|
|
572
563
|
}
|
|
573
564
|
const path = globalThis.Object.entries(values).map(([key, value]) => `${key}/${value}`).join("/");
|
|
@@ -715,7 +706,6 @@ var MockContext = class MockContext {
|
|
|
715
706
|
this.sentActivities = [];
|
|
716
707
|
}
|
|
717
708
|
};
|
|
718
|
-
|
|
719
709
|
//#endregion
|
|
720
710
|
//#region src/mq-tester.ts
|
|
721
711
|
/**
|
|
@@ -896,6 +886,5 @@ async function waitFor(predicate, timeoutMs) {
|
|
|
896
886
|
}
|
|
897
887
|
}
|
|
898
888
|
const getRandomKey = (prefix) => `fedify_test_${prefix}_${crypto.randomUUID()}`;
|
|
899
|
-
|
|
900
889
|
//#endregion
|
|
901
|
-
export { createContext, createFederation, createInboxContext, createRequestContext, getRandomKey, testMessageQueue, waitFor };
|
|
890
|
+
export { createContext, createFederation, createInboxContext, createRequestContext, getRandomKey, testMessageQueue, waitFor };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fedify/testing",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.10",
|
|
4
4
|
"description": "Testing utilities for Fedify applications",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fedify",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"package.json"
|
|
51
51
|
],
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@fedify/fedify": "^2.0.
|
|
53
|
+
"@fedify/fedify": "^2.0.10"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"es-toolkit": "1.43.0"
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"@js-temporal/polyfill": "^0.5.1",
|
|
60
60
|
"@std/assert": "npm:@jsr/std__assert@^1.0.13",
|
|
61
61
|
"@std/async": "npm:@jsr/std__async@^1.0.13",
|
|
62
|
-
"tsdown": "^0.
|
|
63
|
-
"typescript": "^5.9.
|
|
62
|
+
"tsdown": "^0.21.6",
|
|
63
|
+
"typescript": "^5.9.2",
|
|
64
64
|
"@fedify/fixture": "^2.0.0"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|