forked from mirror/misskey
split bindings for exports.ts
型が合わなくて文句を言ってくるので適切に分割
This commit is contained in:
parent
c884abb487
commit
9e7f22f655
@ -116,19 +116,19 @@ describe('export-clips', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('multiple clips', async () => {
|
test('multiple clips', async () => {
|
||||||
let res = await api('clips/create', {
|
const res1 = await api('clips/create', {
|
||||||
name: 'kawaii',
|
name: 'kawaii',
|
||||||
description: 'kawaii',
|
description: 'kawaii',
|
||||||
}, alice);
|
}, alice);
|
||||||
assert.strictEqual(res.status, 200);
|
assert.strictEqual(res1.status, 200);
|
||||||
const clip1 = res.body;
|
const clip1 = res1.body;
|
||||||
|
|
||||||
res = await api('clips/create', {
|
const res2 = await api('clips/create', {
|
||||||
name: 'yuri',
|
name: 'yuri',
|
||||||
description: 'yuri',
|
description: 'yuri',
|
||||||
}, alice);
|
}, alice);
|
||||||
assert.strictEqual(res.status, 200);
|
assert.strictEqual(res2.status, 200);
|
||||||
const clip2 = res.body;
|
const clip2 = res2.body;
|
||||||
|
|
||||||
const note1 = await post(alice, {
|
const note1 = await post(alice, {
|
||||||
text: 'baz1',
|
text: 'baz1',
|
||||||
@ -138,20 +138,26 @@ describe('export-clips', () => {
|
|||||||
text: 'baz2',
|
text: 'baz2',
|
||||||
});
|
});
|
||||||
|
|
||||||
res = await api('clips/add-note', {
|
{
|
||||||
clipId: clip1.id,
|
const res = await api('clips/add-note', {
|
||||||
noteId: note1.id,
|
clipId: clip1.id,
|
||||||
}, alice);
|
noteId: note1.id,
|
||||||
assert.strictEqual(res.status, 204);
|
}, alice);
|
||||||
|
assert.strictEqual(res.status, 204);
|
||||||
|
}
|
||||||
|
|
||||||
res = await api('clips/add-note', {
|
{
|
||||||
clipId: clip2.id,
|
const res = await api('clips/add-note', {
|
||||||
noteId: note2.id,
|
clipId: clip2.id,
|
||||||
}, alice);
|
noteId: note2.id,
|
||||||
assert.strictEqual(res.status, 204);
|
}, alice);
|
||||||
|
assert.strictEqual(res.status, 204);
|
||||||
|
}
|
||||||
|
|
||||||
res = await api('i/export-clips', {}, alice);
|
{
|
||||||
assert.strictEqual(res.status, 204);
|
const res = await api('i/export-clips', {}, alice);
|
||||||
|
assert.strictEqual(res.status, 204);
|
||||||
|
}
|
||||||
|
|
||||||
const exported = await pollFirstDriveFile();
|
const exported = await pollFirstDriveFile();
|
||||||
assert.strictEqual(exported[0].name, 'kawaii');
|
assert.strictEqual(exported[0].name, 'kawaii');
|
||||||
@ -163,7 +169,7 @@ describe('export-clips', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('Clipping other user\'s note', async () => {
|
test('Clipping other user\'s note', async () => {
|
||||||
let res = await api('clips/create', {
|
const res = await api('clips/create', {
|
||||||
name: 'kawaii',
|
name: 'kawaii',
|
||||||
description: 'kawaii',
|
description: 'kawaii',
|
||||||
}, alice);
|
}, alice);
|
||||||
@ -175,14 +181,14 @@ describe('export-clips', () => {
|
|||||||
visibility: 'followers',
|
visibility: 'followers',
|
||||||
});
|
});
|
||||||
|
|
||||||
res = await api('clips/add-note', {
|
const res2 = await api('clips/add-note', {
|
||||||
clipId: clip.id,
|
clipId: clip.id,
|
||||||
noteId: note.id,
|
noteId: note.id,
|
||||||
}, alice);
|
}, alice);
|
||||||
assert.strictEqual(res.status, 204);
|
assert.strictEqual(res2.status, 204);
|
||||||
|
|
||||||
res = await api('i/export-clips', {}, alice);
|
const res3 = await api('i/export-clips', {}, alice);
|
||||||
assert.strictEqual(res.status, 204);
|
assert.strictEqual(res3.status, 204);
|
||||||
|
|
||||||
const exported = await pollFirstDriveFile();
|
const exported = await pollFirstDriveFile();
|
||||||
assert.strictEqual(exported[0].name, 'kawaii');
|
assert.strictEqual(exported[0].name, 'kawaii');
|
||||||
|
Loading…
Reference in New Issue
Block a user