@fedify/testing 2.2.0-dev.610 → 2.2.0-dev.622
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: () => ({
|
|
@@ -372,9 +345,8 @@ var MockFederation = class {
|
|
|
372
345
|
}
|
|
373
346
|
createContext(baseUrlOrRequest, contextData) {
|
|
374
347
|
const mockFederation = this;
|
|
375
|
-
const url = baseUrlOrRequest instanceof Request ? new URL(baseUrlOrRequest.url) : baseUrlOrRequest;
|
|
376
348
|
return new MockContext({
|
|
377
|
-
url,
|
|
349
|
+
url: baseUrlOrRequest instanceof Request ? new URL(baseUrlOrRequest.url) : baseUrlOrRequest,
|
|
378
350
|
data: contextData,
|
|
379
351
|
federation: mockFederation
|
|
380
352
|
});
|
|
@@ -396,13 +368,10 @@ var MockFederation = class {
|
|
|
396
368
|
const typeName = activity.constructor.name;
|
|
397
369
|
const listeners = this.inboxListeners.get(typeName) || [];
|
|
398
370
|
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.");
|
|
399
|
-
for (const listener of listeners) {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
});
|
|
404
|
-
await listener(context, activity);
|
|
405
|
-
}
|
|
371
|
+
for (const listener of listeners) await listener(createInboxContext({
|
|
372
|
+
data: this.contextData,
|
|
373
|
+
federation: this
|
|
374
|
+
}), activity);
|
|
406
375
|
}
|
|
407
376
|
/**
|
|
408
377
|
* Clears all sent activities from the mock federation.
|
|
@@ -536,10 +505,10 @@ var MockContext = class MockContext {
|
|
|
536
505
|
this.request = new Request(url);
|
|
537
506
|
this.data = options.data;
|
|
538
507
|
this.federation = options.federation;
|
|
539
|
-
this.documentLoader = options.documentLoader ?? (async (url
|
|
508
|
+
this.documentLoader = options.documentLoader ?? (async (url) => ({
|
|
540
509
|
contextUrl: null,
|
|
541
510
|
document: {},
|
|
542
|
-
documentUrl: url
|
|
511
|
+
documentUrl: url
|
|
543
512
|
}));
|
|
544
513
|
this.contextLoader = options.contextLoader ?? this.documentLoader;
|
|
545
514
|
this.tracerProvider = options.tracerProvider ?? noopTracerProvider;
|
|
@@ -592,8 +561,8 @@ var MockContext = class MockContext {
|
|
|
592
561
|
if (this.federation instanceof MockFederation) {
|
|
593
562
|
const pathTemplate = this.federation.objectPaths.get(cls.typeId.href);
|
|
594
563
|
if (pathTemplate) {
|
|
595
|
-
const path
|
|
596
|
-
return new URL(path
|
|
564
|
+
const path = expandUriTemplate(pathTemplate, values);
|
|
565
|
+
return new URL(path, this.origin);
|
|
597
566
|
}
|
|
598
567
|
}
|
|
599
568
|
const path = globalThis.Object.entries(values).map(([key, value]) => `${key}/${value}`).join("/");
|
|
@@ -672,12 +641,12 @@ var MockContext = class MockContext {
|
|
|
672
641
|
const owner = this.getActorUri(identifier);
|
|
673
642
|
return keyPairs.map((kp) => ({
|
|
674
643
|
...kp,
|
|
675
|
-
cryptographicKey: new
|
|
644
|
+
cryptographicKey: new _fedify_vocab.CryptographicKey({
|
|
676
645
|
id: kp.keyId,
|
|
677
646
|
owner,
|
|
678
647
|
publicKey: kp.publicKey
|
|
679
648
|
}),
|
|
680
|
-
multikey: new
|
|
649
|
+
multikey: new _fedify_vocab.Multikey({
|
|
681
650
|
id: kp.keyId,
|
|
682
651
|
controller: owner,
|
|
683
652
|
publicKey: kp.publicKey
|
|
@@ -741,7 +710,6 @@ var MockContext = class MockContext {
|
|
|
741
710
|
this.sentActivities = [];
|
|
742
711
|
}
|
|
743
712
|
};
|
|
744
|
-
|
|
745
713
|
//#endregion
|
|
746
714
|
//#region src/mq-tester.ts
|
|
747
715
|
/**
|
|
@@ -922,7 +890,6 @@ async function waitFor(predicate, timeoutMs) {
|
|
|
922
890
|
}
|
|
923
891
|
}
|
|
924
892
|
const getRandomKey = (prefix) => `fedify_test_${prefix}_${crypto.randomUUID()}`;
|
|
925
|
-
|
|
926
893
|
//#endregion
|
|
927
894
|
exports.createContext = createContext;
|
|
928
895
|
exports.createFederation = createFederation;
|
|
@@ -930,4 +897,4 @@ exports.createInboxContext = createInboxContext;
|
|
|
930
897
|
exports.createRequestContext = createRequestContext;
|
|
931
898
|
exports.getRandomKey = getRandomKey;
|
|
932
899
|
exports.testMessageQueue = testMessageQueue;
|
|
933
|
-
exports.waitFor = waitFor;
|
|
900
|
+
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: () => ({
|
|
@@ -349,9 +344,8 @@ var MockFederation = class {
|
|
|
349
344
|
}
|
|
350
345
|
createContext(baseUrlOrRequest, contextData) {
|
|
351
346
|
const mockFederation = this;
|
|
352
|
-
const url = baseUrlOrRequest instanceof Request ? new URL(baseUrlOrRequest.url) : baseUrlOrRequest;
|
|
353
347
|
return new MockContext({
|
|
354
|
-
url,
|
|
348
|
+
url: baseUrlOrRequest instanceof Request ? new URL(baseUrlOrRequest.url) : baseUrlOrRequest,
|
|
355
349
|
data: contextData,
|
|
356
350
|
federation: mockFederation
|
|
357
351
|
});
|
|
@@ -373,13 +367,10 @@ var MockFederation = class {
|
|
|
373
367
|
const typeName = activity.constructor.name;
|
|
374
368
|
const listeners = this.inboxListeners.get(typeName) || [];
|
|
375
369
|
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.");
|
|
376
|
-
for (const listener of listeners) {
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
});
|
|
381
|
-
await listener(context, activity);
|
|
382
|
-
}
|
|
370
|
+
for (const listener of listeners) await listener(createInboxContext({
|
|
371
|
+
data: this.contextData,
|
|
372
|
+
federation: this
|
|
373
|
+
}), activity);
|
|
383
374
|
}
|
|
384
375
|
/**
|
|
385
376
|
* Clears all sent activities from the mock federation.
|
|
@@ -513,10 +504,10 @@ var MockContext = class MockContext {
|
|
|
513
504
|
this.request = new Request(url);
|
|
514
505
|
this.data = options.data;
|
|
515
506
|
this.federation = options.federation;
|
|
516
|
-
this.documentLoader = options.documentLoader ?? (async (url
|
|
507
|
+
this.documentLoader = options.documentLoader ?? (async (url) => ({
|
|
517
508
|
contextUrl: null,
|
|
518
509
|
document: {},
|
|
519
|
-
documentUrl: url
|
|
510
|
+
documentUrl: url
|
|
520
511
|
}));
|
|
521
512
|
this.contextLoader = options.contextLoader ?? this.documentLoader;
|
|
522
513
|
this.tracerProvider = options.tracerProvider ?? noopTracerProvider;
|
|
@@ -569,8 +560,8 @@ var MockContext = class MockContext {
|
|
|
569
560
|
if (this.federation instanceof MockFederation) {
|
|
570
561
|
const pathTemplate = this.federation.objectPaths.get(cls.typeId.href);
|
|
571
562
|
if (pathTemplate) {
|
|
572
|
-
const path
|
|
573
|
-
return new URL(path
|
|
563
|
+
const path = expandUriTemplate(pathTemplate, values);
|
|
564
|
+
return new URL(path, this.origin);
|
|
574
565
|
}
|
|
575
566
|
}
|
|
576
567
|
const path = globalThis.Object.entries(values).map(([key, value]) => `${key}/${value}`).join("/");
|
|
@@ -718,7 +709,6 @@ var MockContext = class MockContext {
|
|
|
718
709
|
this.sentActivities = [];
|
|
719
710
|
}
|
|
720
711
|
};
|
|
721
|
-
|
|
722
712
|
//#endregion
|
|
723
713
|
//#region src/mq-tester.ts
|
|
724
714
|
/**
|
|
@@ -899,6 +889,5 @@ async function waitFor(predicate, timeoutMs) {
|
|
|
899
889
|
}
|
|
900
890
|
}
|
|
901
891
|
const getRandomKey = (prefix) => `fedify_test_${prefix}_${crypto.randomUUID()}`;
|
|
902
|
-
|
|
903
892
|
//#endregion
|
|
904
|
-
export { createContext, createFederation, createInboxContext, createRequestContext, getRandomKey, testMessageQueue, waitFor };
|
|
893
|
+
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.2.0-dev.
|
|
3
|
+
"version": "2.2.0-dev.622+e54cb037",
|
|
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.2.0-dev.
|
|
53
|
+
"@fedify/fedify": "^2.2.0-dev.622+e54cb037"
|
|
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": {
|