Compare commits

..

No commits in common. "73f8a536ac36b7d64807c3f5e162f81ed052d246" and "4a4f0f5579eb8468d65cf70eb965cd959f6f1312" have entirely different histories.

1 changed files with 2 additions and 7 deletions

View File

@ -7,8 +7,6 @@ process.env.NODE_ENV = 'test';
import * as assert from 'assert'; import * as assert from 'assert';
import * as fs from 'node:fs'; import * as fs from 'node:fs';
import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { jest } from '@jest/globals'; import { jest } from '@jest/globals';
@ -31,9 +29,6 @@ import { secureRndstr } from '@/misc/secure-rndstr.js';
import { DownloadService } from '@/core/DownloadService.js'; import { DownloadService } from '@/core/DownloadService.js';
import { genAidx } from '@/misc/id/aidx.js'; import { genAidx } from '@/misc/id/aidx.js';
const _filename = fileURLToPath(import.meta.url);
const _dirname = dirname(_filename);
const host = 'https://host1.test'; const host = 'https://host1.test';
type NonTransientIActor = IActor & { id: string }; type NonTransientIActor = IActor & { id: string };
@ -126,10 +121,10 @@ describe('ActivityPub', () => {
imports: [GlobalModule, CoreModule], imports: [GlobalModule, CoreModule],
}) })
.overrideProvider(DownloadService).useValue({ .overrideProvider(DownloadService).useValue({
async downloadUrl(url: string, path: string): Promise<{ filename: string }> { async downloadUrl(url, path): Promise<{ filename: string }> {
if (url.endsWith('.png')) { if (url.endsWith('.png')) {
fs.copyFileSync( fs.copyFileSync(
_dirname + '/../resources/hw.png', `${__dirname}/../resources/hw.png`,
path, path,
); );
} }