Update activitypub.ts
This commit is contained in:
parent
4f9f36c41b
commit
4d9b52968e
|
@ -106,7 +106,11 @@ describe('ActivityPub', () => {
|
||||||
sensitiveWords: [] as string[],
|
sensitiveWords: [] as string[],
|
||||||
prohibitedWords: [] as string[],
|
prohibitedWords: [] as string[],
|
||||||
} as MiMeta;
|
} as MiMeta;
|
||||||
let meta = metaInitial;
|
const meta = metaInitial;
|
||||||
|
|
||||||
|
function updateMeta(newMeta: Partial<MiMeta>): void {
|
||||||
|
Object.assign(meta, newMeta);
|
||||||
|
}
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
const app = await Test.createTestingModule({
|
const app = await Test.createTestingModule({
|
||||||
|
@ -363,7 +367,7 @@ describe('ActivityPub', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test('cacheRemoteFiles=false disables caching', async () => {
|
test('cacheRemoteFiles=false disables caching', async () => {
|
||||||
meta = { ...metaInitial, cacheRemoteFiles: false };
|
updateMeta({ ...metaInitial, cacheRemoteFiles: false });
|
||||||
|
|
||||||
const imageObject: IApDocument = {
|
const imageObject: IApDocument = {
|
||||||
type: 'Document',
|
type: 'Document',
|
||||||
|
@ -392,7 +396,7 @@ describe('ActivityPub', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test('cacheRemoteSensitiveFiles=false only affects sensitive files', async () => {
|
test('cacheRemoteSensitiveFiles=false only affects sensitive files', async () => {
|
||||||
meta = { ...metaInitial, cacheRemoteSensitiveFiles: false };
|
updateMeta({ ...metaInitial, cacheRemoteSensitiveFiles: false });
|
||||||
|
|
||||||
const imageObject: IApDocument = {
|
const imageObject: IApDocument = {
|
||||||
type: 'Document',
|
type: 'Document',
|
||||||
|
|
Loading…
Reference in New Issue