adjust tests

This commit is contained in:
Kagami Sascha Rosylight
2023-07-08 15:40:48 +02:00
parent 7bf318ae98
commit 6087d02047
3 changed files with 14 additions and 6 deletions

View File

@@ -38,13 +38,17 @@ export class MockResolver extends Resolver {
);
}
public async _register(uri: string, content: string | Record<string, any>, type = 'application/activity+json') {
public _register(uri: string, content: string | Record<string, any>, type = 'application/activity+json') {
this._rs.set(uri, {
type,
content: typeof content === 'string' ? content : JSON.stringify(content),
});
}
public clear() {
this._rs.clear();
}
@bindThis
public async resolve(value: string | IObject): Promise<IObject> {
if (typeof value !== 'string') return value;