mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-21 22:35:11 +00:00
fix lint errors in backend unit tests
This commit is contained in:
parent
7431866d86
commit
b5a1c54d65
6 changed files with 11 additions and 11 deletions
|
@ -237,7 +237,7 @@ describe('アンテナ', () => {
|
|||
status: 400,
|
||||
code: 'EMPTY_KEYWORD',
|
||||
id: '53ee222e-1ddd-4f9a-92e5-9fb82ddb463a'
|
||||
})
|
||||
});
|
||||
});
|
||||
//#endregion
|
||||
//#region 更新(antennas/update)
|
||||
|
@ -276,7 +276,7 @@ describe('アンテナ', () => {
|
|||
status: 400,
|
||||
code: 'EMPTY_KEYWORD',
|
||||
id: '721aaff6-4e1b-4d88-8de6-877fae9f68c4'
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
//#endregion
|
||||
|
|
|
@ -156,7 +156,7 @@ describe('Webリソース', () => {
|
|||
|
||||
describe(' has entry such ', () => {
|
||||
beforeEach(() => {
|
||||
post(alice, { text: "**a**" })
|
||||
post(alice, { text: "**a**" });
|
||||
});
|
||||
|
||||
test('MFMを含まない。', async () => {
|
||||
|
@ -169,7 +169,7 @@ describe('Webリソース', () => {
|
|||
throw new Error("MFM shouldn't be included");
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
describe.each([{ path: '/api/foo' }])('$path', ({ path }) => {
|
||||
|
|
|
@ -35,7 +35,7 @@ describe('FileInfoService', () => {
|
|||
delete fi.porn;
|
||||
|
||||
return fi;
|
||||
}
|
||||
};
|
||||
|
||||
beforeAll(async () => {
|
||||
app = await Test.createTestingModule({
|
||||
|
|
|
@ -89,8 +89,8 @@ describe('SigninWithPasskeyApiService', () => {
|
|||
app = await Test.createTestingModule({
|
||||
imports: [GlobalModule, CoreModule],
|
||||
providers: [
|
||||
SigninWithPasskeyApiService,
|
||||
{ provide: RateLimiterService, useClass: FakeLimiter },
|
||||
SigninWithPasskeyApiService,
|
||||
{ provide: RateLimiterService, useClass: FakeLimiter },
|
||||
{ provide: SigninService, useClass: FakeSigninService },
|
||||
],
|
||||
}).useMocker((token) => {
|
||||
|
@ -116,7 +116,7 @@ describe('SigninWithPasskeyApiService', () => {
|
|||
|
||||
const dummyUser = {
|
||||
id: uid, username: uid, usernameLower: uid.toLocaleLowerCase(), uri: null, host: null,
|
||||
};
|
||||
};
|
||||
const dummyProfile = {
|
||||
userId: uid,
|
||||
password: 'qwerty',
|
||||
|
|
|
@ -314,7 +314,7 @@ describe('ActivityPub', () => {
|
|||
// actor2Note is from a different server and needs to be fetched again
|
||||
assert.deepStrictEqual(
|
||||
resolver.remoteGetTrials(),
|
||||
[actor1.id, `${actor1.id}/outbox`, actor1.featured, actor2Note.id, actor2.id, `${actor2.id}/outbox` ],
|
||||
[actor1.id, `${actor1.id}/outbox`, actor1.featured, actor2Note.id, actor2.id, `${actor2.id}/outbox`],
|
||||
);
|
||||
|
||||
const note = await noteService.fetchNote(actor2Note.id);
|
||||
|
@ -440,7 +440,7 @@ describe('ActivityPub', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('JSON-LD', () =>{
|
||||
describe('JSON-LD', () => {
|
||||
test('Compaction', async () => {
|
||||
const jsonLd = jsonLdService.use();
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ describe(SkLatestNote, () => {
|
|||
|
||||
it('should return true when keys match with different file counts', () => {
|
||||
const first = new MiNote({ id: '1', userId: 'abc123', visibility: 'public', replyId: null, renoteId: null, fileIds: ['1'] });
|
||||
const second = new MiNote({ id: '2', userId: 'abc123', visibility: 'public', replyId: null, renoteId: null, fileIds: ['1','2'] });
|
||||
const second = new MiNote({ id: '2', userId: 'abc123', visibility: 'public', replyId: null, renoteId: null, fileIds: ['1', '2'] });
|
||||
|
||||
const result = SkLatestNote.areEquivalent(first, second);
|
||||
|
||||
|
|
Loading…
Reference in a new issue