Merge remote-tracking branch 'misskey-dev/develop' into io
This commit is contained in:
commit
9e63703d59
35 changed files with 1455 additions and 1309 deletions
|
@ -6,23 +6,16 @@
|
|||
process.env.NODE_ENV = 'test';
|
||||
|
||||
import * as assert from 'assert';
|
||||
import { MiNote } from '@/models/Note.js';
|
||||
import type { Packed } from '@/misc/json-schema.js';
|
||||
import { api, initTestDb, makeStreamCatcher, post, sendEnvUpdateRequest, signup, uploadFile } from '../utils.js';
|
||||
import { api, makeStreamCatcher, post, signup, uploadFile } from '../utils.js';
|
||||
import type * as misskey from 'misskey-js';
|
||||
import type{ Repository } from 'typeorm';
|
||||
|
||||
describe('Drive', () => {
|
||||
let Notes: Repository<MiNote>;
|
||||
|
||||
let alice: misskey.entities.SignupResponse;
|
||||
let bob: misskey.entities.SignupResponse;
|
||||
|
||||
beforeAll(async () => {
|
||||
await sendEnvUpdateRequest({ key: 'FORCE_IGNORE_IDEMPOTENCY_FOR_TESTING', value: 'true' });
|
||||
|
||||
const connection = await initTestDb(true);
|
||||
Notes = connection.getRepository(MiNote);
|
||||
alice = await signup({ username: 'alice' });
|
||||
bob = await signup({ username: 'bob' });
|
||||
}, 1000 * 60 * 2);
|
||||
|
@ -38,7 +31,7 @@ describe('Drive', () => {
|
|||
alice,
|
||||
'main',
|
||||
(msg) => msg.type === 'urlUploadFinished' && msg.body.marker === marker,
|
||||
(msg) => msg.body.file as Packed<'DriveFile'>,
|
||||
(msg) => msg.body.file,
|
||||
10 * 1000);
|
||||
|
||||
const res = await api('drive/files/upload-from-url', {
|
||||
|
@ -92,4 +85,3 @@ describe('Drive', () => {
|
|||
assert.strictEqual('error' in res.body, true);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue