clean up test

This commit is contained in:
tamaina 2025-08-30 18:46:51 +09:00
parent 2afb9fe5ab
commit a833488c22
1 changed files with 2 additions and 4 deletions

View File

@ -1,11 +1,10 @@
import { strictEqual, rejects } from 'node:assert'; import { strictEqual, rejects } from 'node:assert';
import * as Misskey from 'misskey-js'; import { createAccount, sleep, type LoginUser } from '../../utils.js';
import { createAccount, resolveRemoteUser, sleep, type LoginUser } from '../../utils.js';
describe('API ap/show', () => { describe('API ap/show', () => {
let alice: LoginUser, bob: LoginUser; let alice: LoginUser, bob: LoginUser;
beforeAll(async () => { beforeEach(async () => {
[alice, bob] = await Promise.all([ [alice, bob] = await Promise.all([
createAccount('a.test'), createAccount('a.test'),
createAccount('b.test'), createAccount('b.test'),
@ -41,7 +40,6 @@ describe('API ap/show', () => {
describe('Note resolution', () => { describe('Note resolution', () => {
test('resolve by note URL (https://b.test/notes/:id)', async () => { test('resolve by note URL (https://b.test/notes/:id)', async () => {
const note = (await bob.client.request('notes/create', { text: 'hello from Bob' })).createdNote; const note = (await bob.client.request('notes/create', { text: 'hello from Bob' })).createdNote;
// 伝搬待ち
await sleep(); await sleep();
const res = await alice.client.request('ap/show', { uri: `https://b.test/notes/${note.id}` }); const res = await alice.client.request('ap/show', { uri: `https://b.test/notes/${note.id}` });